Skip to content

Commit 2fc5d53

Browse files
committed
Squashed 'libs/editor/' changes from b207f3f..5ee37c8
5ee37c8 Merge pull request #419 from wordpress-mobile/js-tests 3c6a922 s/functional/unit/ 04b81e3 Updated README with Mocha test instructions 4d75715 Comment cleanup ef276fc Merge branch 'develop' into js-tests 8f06353 Added mocha tests for HTML to visual conversion d03ea19 Merge pull request #418 from wordpress-mobile/issue/415-media-delete-paragraphs 30a3c66 Exported some Visual -> HTML conversion methods to editor-utils-formatter for testability a53706d Merge pull request #414 from wordpress-mobile/issue/411-edit-overlay-stuck 8f3f816 Added editor-utils-formatter.js file and exported HTML->Visual formatting methods from the ZSSEditor JS aa4bb12 Don't add extraneous break tag after videos when converting from HTML dcbdbf1 Fix paragraph wrapping around media items when loading from HTML 7948e95 Fix duplicate src tag for videos 6470a4e Don't delete the paragraph div when deleting a media item d189b09 Merge pull request #410 from wordpress-mobile/issue/377-video-remove-button e13f5fc Fixed edit containers not being cleared when switching to HTML mode eff160c Fixed #408 0acaa82 Extend contenteditable=false to the entire edit container for videos 9774ef0 Merge pull request #404 from wordpress-mobile/issue/update-html-toolbar-icon 531f368 When adding edit containers for videos in ZSSEditor.applyVisualFormatting, track them for mutation 5f0444c Add edit containers to videos when applying visual formatting 9c89dfc Remove edit containers wrapping videos when stripping visual formatting b91317f Fixed trackNodeForMutation usage when video upload completes 3c6f61f Added a null check to ZSSEditor.sendEnabledStyles 86923d2 Track video edit containers for mutation 1a07cbf Fixed paragraph issues when adding remote videos at the start of a post 0917a1b Add delete button overlay for videos added directly (without being uploaded) d370041 Show delete button overlay for videos that have finished uploading 546d4c6 update with new HTML icons / using a solid background on highlighted version git-subtree-dir: libs/editor git-subtree-split: 5ee37c8c995994edeb87651efebce57b870ff3b7
1 parent 19320ef commit 2fc5d53

File tree

10 files changed

+415
-187
lines changed

10 files changed

+415
-187
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ WordPress/src/main/res/values/com_crashlytics_export_strings.xml
5050

5151
# libs
5252
libs/utils
53+
54+
# Node-based JS Tests
55+
node_modules
56+
npm-debug.log*

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ Integration testing is done with the [Android testing framework](http://develope
3434

3535
Add new unit tests to `src/test/java/` and integration tests to `stc/androidTest/java/`.
3636

37+
### JavaScript Tests ###
38+
39+
This project also has unit tests for the JS part of the editor using [Mocha](https://mochajs.org/).
40+
41+
To be able to run the tests, [npm](https://www.npmjs.com/) and Mocha (`npm install -g mocha`) are required.
42+
43+
With npm and Mocha installed, from within `libs/editor-common/assets/test`, run:
44+
45+
npm install chai
46+
47+
It should now be possible to run the tests using `mocha` inside `libs/editor-common/assets`.
48+
3749
## LICENSE ##
3850

3951
WordPress-Editor-Android is an Open Source project covered by the [GNU General Public License version 2](LICENSE.md).
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:width="44dp"
4-
android:height="44dp"
5-
android:viewportWidth="44"
6-
android:viewportHeight="44">
7-
2+
android:width="44dp"
3+
android:height="44dp"
4+
android:viewportWidth="44.0"
5+
android:viewportHeight="44.0">
86
<path
9-
android:fillColor="#87A6BC"
10-
android:pathData="M16.294,25h-1.288v-2.738h-1.907V25h-1.292v-6.398h1.292v2.588h1.907v-2.588h1.288V25z" />
7+
android:pathData="M13.93,26H12.79v-4.16H9.17V26H8.04v-9h1.13v3.87h3.62V17h1.14V26z"
8+
android:fillColor="#A6BCCC"/>
119
<path
12-
android:fillColor="#87A6BC"
13-
android:pathData="M21.348,19.678h-1.582V25h-1.297v-5.322h-1.555v-1.077h4.434V19.678z" />
10+
android:pathData="M20.97,17.97H18.6V26h-1.13v-8.03h-2.36V17h5.86V17.97z"
11+
android:fillColor="#A6BCCC"/>
1412
<path
15-
android:fillColor="#87A6BC"
16-
android:pathData="M23.777,18.602l1.209,4.627l1.204-4.627h1.688V25h-1.296v-1.731l0.118-2.667L25.422,25h-0.879
17-
l-1.279-4.399l0.119,2.667V25H22.09v-6.398H23.777z" />
13+
android:pathData="M23.75,17l2.35,7.34L28.45,17h1.46v9h-1.13v-3.51l0.1,-3.51L26.53,26h-0.87l-2.34,-6.99l0.1,3.49V26h-1.13v-9H23.75z"
14+
android:fillColor="#A6BCCC"/>
1815
<path
19-
android:fillColor="#87A6BC"
20-
android:pathData="M30.207,23.928h2.268V25h-3.561v-6.398h1.293V23.928z" />
21-
</vector>
16+
android:pathData="M33,25.03h3.53V26h-4.67v-9h1.14V25.03z"
17+
android:fillColor="#A6BCCC"/>
18+
</vector>
Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:width="44dp"
4-
android:height="44dp"
5-
android:viewportWidth="44"
6-
android:viewportHeight="44">
7-
8-
<path
9-
android:fillColor="#E8EEF2"
10-
android:pathData="M15.006,21.19h-1.907v-2.588h-1.292V25h1.292v-2.738h1.907V25h1.288v-6.398h-1.288V21.19z
11-
M16.914,19.678h1.555V25h1.297v-5.322h1.582v-1.077h-4.434V19.678z
12-
M24.986,23.229l-1.209-4.627H22.09V25h1.293v-1.731
13-
l-0.119-2.667L24.543,25h0.879l1.278-4.399l-0.118,2.667V25h1.296v-6.398H26.19L24.986,23.229z
14-
M30.207,23.928v-5.326h-1.293V25 h3.561v-1.072H30.207z" />
15-
</vector>
2+
android:width="44dp"
3+
android:height="44dp"
4+
android:viewportWidth="44.0"
5+
android:viewportHeight="44.0">
6+
<path
7+
android:pathData="M13.93,26H12.79v-4.16H9.17V26H8.04v-9h1.13v3.87h3.62V17h1.14V26z"
8+
android:fillColor="#E8EEF2"/>
9+
<path
10+
android:pathData="M20.97,17.97H18.6V26h-1.13v-8.03h-2.36V17h5.86V17.97z"
11+
android:fillColor="#E8EEF2"/>
12+
<path
13+
android:pathData="M23.75,17l2.35,7.34L28.45,17h1.46v9h-1.13v-3.51l0.1,-3.51L26.53,26h-0.87l-2.34,-6.99l0.1,3.49V26h-1.13v-9H23.75z"
14+
android:fillColor="#E8EEF2"/>
15+
<path
16+
android:pathData="M33,25.03h3.53V26h-4.67v-9h1.14V25.03z"
17+
android:fillColor="#E8EEF2"/>
18+
</vector>
Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:width="44dp"
4-
android:height="44dp"
5-
android:viewportWidth="44"
6-
android:viewportHeight="44">
7-
8-
<path
9-
android:fillColor="#0084BC"
10-
android:pathData="M15.006,21.19h-1.907v-2.588h-1.292V25h1.292v-2.738h1.907V25h1.288v-6.398h-1.288V21.19z
11-
M16.914,19.678h1.555V25h1.297v-5.322h1.582v-1.077h-4.434V19.678z
12-
M24.986,23.229l-1.209-4.627H22.09V25h1.293v-1.731
13-
l-0.119-2.667L24.543,25h0.879l1.278-4.399l-0.118,2.667V25h1.296v-6.398H26.19L24.986,23.229z
14-
M30.207,23.928v-5.326h-1.293V25 h3.561v-1.072H30.207z" />
15-
</vector>
2+
android:width="44dp"
3+
android:height="44dp"
4+
android:viewportWidth="44.0"
5+
android:viewportHeight="44.0">
6+
<path android:fillColor="#E1EBF1" android:pathData="M0,0h44v44h-44z"/>
7+
<path
8+
android:pathData="M13.93,26H12.79v-4.16H9.17V26H8.04v-9h1.13v3.87h3.62V17h1.14V26z"
9+
android:fillColor="#A6BCCC"/>
10+
<path
11+
android:pathData="M20.97,17.97H18.6V26h-1.13v-8.03h-2.36V17h5.86V17.97z"
12+
android:fillColor="#A6BCCC"/>
13+
<path
14+
android:pathData="M23.75,17l2.35,7.34L28.45,17h1.46v9h-1.13v-3.51l0.1,-3.51L26.53,26h-0.87l-2.34,-6.99l0.1,3.49V26h-1.13v-9H23.75z"
15+
android:fillColor="#A6BCCC"/>
16+
<path
17+
android:pathData="M33,25.03h3.53V26h-4.67v-9h1.14V25.03z"
18+
android:fillColor="#A6BCCC"/>
19+
</vector>

0 commit comments

Comments
 (0)