Skip to content

Commit 9655577

Browse files
committed
Test: Fix edit text to html related test failures
Some of the failures were caused due to the '<em>' and '<strong>' needing to be the other way around. Other failures were caused due to the '<i>' and '<s>' needing to be the other way around. While, some more failure were caused due to the '<a href="xyz">', '<b>' and/or '<s>' needing to be the other way around. This test failures are most probably related to Robolectric, and the fact that the '@config(sdk = [23])' had to be removed, thus implicitly updated, and all that, due to the 'minSdkVersion' to '24' change. However, there is also a slight possibility that this is a breaking change due to the 'minSdkVersion' to '24' update. Thus, this change need to be verified and tested.
1 parent 39fdd73 commit 9655577

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

aztec/src/test/kotlin/org/wordpress/aztec/AztecToolbarTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,13 +437,13 @@ class AztecToolbarTest {
437437
* <strong>
438438
* bold
439439
* </strong>
440-
* <strong>
441-
* <em>
440+
* <em>
441+
* <strong>
442442
* bolditalic
443-
* </em>
444-
* </strong>
443+
* </strong>
444+
* </em>
445445
*/
446-
Assert.assertEquals("<strong>bold</strong><strong><em>bolditalic</em></strong>", editText.toHtml())
446+
Assert.assertEquals("<strong>bold</strong><em><strong>bolditalic</strong></em>", editText.toHtml())
447447
boldButton.performClick()
448448
Assert.assertFalse(boldButton.isChecked)
449449

aztec/src/test/kotlin/org/wordpress/aztec/LinkTest.kt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,20 @@ class LinkTest {
5555
* left
5656
* </s>
5757
* </b>
58-
* <b>
59-
* <s>
60-
* <a href="http://wordpress.com">
58+
* <a href="http://wordpress.com">
59+
* <b>
60+
* <s>
6161
* WordPress
62-
* </a>
63-
* </s>
64-
* </b>
65-
* <s>
66-
* <i>
62+
* </s>
63+
* </b>
64+
* </a>
65+
* <i>
66+
* <s>
6767
* right
68-
* </i>
69-
* </s>
68+
* </s>
69+
* </i>
7070
*/
71-
Assert.assertEquals("<b><s>left</s></b><b><s><a href=\"http://wordpress.com\">WordPress</a></s></b><s><i>right</i></s>", editText.toHtml())
71+
Assert.assertEquals("<b><s>left</s></b><a href=\"http://wordpress.com\"><b><s>WordPress</s></b></a><i><s>right</s></i>", editText.toHtml())
7272
}
7373

7474
@Test
@@ -183,14 +183,14 @@ class LinkTest {
183183
* <a href="http://automattic.com">
184184
* FirstUrl Hello
185185
* </a>
186-
* <a href="http://automattic.com">
187-
* <b>
186+
* <b>
187+
* <a href="http://automattic.com">
188188
* SecondUrl
189-
* </b>
190-
* </a>
189+
* </a>
190+
* </b>
191191
*/
192-
Assert.assertEquals("<a href=\"http://automattic.com\">FirstUrl Hello </a>" +
193-
"<a href=\"http://automattic.com\"><b>SecondUrl</b></a>", editText.toHtml())
192+
Assert.assertEquals("<a href=\"http://automattic.com\">FirstUrl Hello </a><b>" +
193+
"<a href=\"http://automattic.com\">SecondUrl</a></b>", editText.toHtml())
194194
}
195195

196196
@Test

0 commit comments

Comments
 (0)