| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.xwiki.test.wysiwyg; |
| 21 |
|
|
| 22 |
|
import org.junit.Test; |
| 23 |
|
import org.xwiki.test.wysiwyg.framework.AbstractWysiwygTestCase; |
| 24 |
|
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
@version |
| 31 |
|
|
| |
|
| 82.5% |
Uncovered Elements: 77 (440) |
Complexity: 43 |
Complexity Density: 0.11 |
|
| 32 |
|
public class ListTest extends AbstractWysiwygTestCase |
| 33 |
|
{ |
| 34 |
|
|
| 35 |
|
@see |
| 36 |
|
|
| 37 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
1PASS
|
|
| 38 |
1 |
@Test... |
| 39 |
|
public void testEmptyListItemsEditable() |
| 40 |
|
{ |
| 41 |
1 |
switchToSource(); |
| 42 |
1 |
setSourceText("** rox"); |
| 43 |
1 |
switchToWysiwyg(); |
| 44 |
|
|
| 45 |
1 |
assertContent("<ul><li><br><ul><li>rox</li></ul></li></ul>"); |
| 46 |
|
|
| 47 |
1 |
moveCaret("document.body.firstChild.firstChild", 0); |
| 48 |
1 |
typeText("x"); |
| 49 |
1 |
assertContent("<ul><li>x<br><ul><li>rox</li></ul></li></ul>"); |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 1 |
Complexity Density: 0.11 |
1PASS
|
|
| 57 |
1 |
@Test... |
| 58 |
|
public void testEnterBeforeSublist() |
| 59 |
|
{ |
| 60 |
1 |
switchToSource(); |
| 61 |
1 |
setSourceText("* x\n** rox"); |
| 62 |
1 |
switchToWysiwyg(); |
| 63 |
1 |
moveCaret("document.body.firstChild.firstChild.firstChild", 1); |
| 64 |
1 |
typeEnter(); |
| 65 |
|
|
| 66 |
1 |
assertContent("<ul><li>x</li><li><br><ul><li>rox</li></ul></li></ul>"); |
| 67 |
1 |
moveCaret("document.body.firstChild.childNodes[1]", 0); |
| 68 |
1 |
typeText("w"); |
| 69 |
1 |
assertContent("<ul><li>x</li><li>w<br><ul><li>rox</li></ul></li></ul>"); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
1PASS
|
|
| 76 |
1 |
@Test... |
| 77 |
|
public void testEnterOnEntireList() |
| 78 |
|
{ |
| 79 |
1 |
switchToSource(); |
| 80 |
1 |
setSourceText("* foo\n* bar"); |
| 81 |
1 |
switchToWysiwyg(); |
| 82 |
|
|
| 83 |
1 |
select("document.body.firstChild.firstChild.firstChild", 0, "document.body.firstChild.lastChild.firstChild", 3); |
| 84 |
1 |
typeEnter(); |
| 85 |
1 |
typeText("x"); |
| 86 |
1 |
assertContent("<p><br></p>x"); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 1 |
Complexity Density: 0.11 |
1PASS
|
|
| 92 |
1 |
@Test... |
| 93 |
|
public void testDeleteInsideItem() |
| 94 |
|
{ |
| 95 |
1 |
switchToSource(); |
| 96 |
1 |
setSourceText("* foo**bar**\n** far"); |
| 97 |
1 |
switchToWysiwyg(); |
| 98 |
|
|
| 99 |
1 |
moveCaret("document.body.firstChild.firstChild.firstChild", 1); |
| 100 |
1 |
typeDelete(); |
| 101 |
1 |
assertContent("<ul><li>fo<strong>bar</strong><ul><li>far</li></ul></li></ul>"); |
| 102 |
|
|
| 103 |
|
|
| 104 |
1 |
moveCaret("document.body.firstChild.firstChild.firstChild", 2); |
| 105 |
1 |
typeDelete(); |
| 106 |
1 |
assertContent("<ul><li>fo<strong>ar</strong><ul><li>far</li></ul></li></ul>"); |
| 107 |
|
} |
| 108 |
|
|
| 109 |
|
|
| 110 |
|
|
| 111 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
1PASS
|
|
| 112 |
1 |
@Test... |
| 113 |
|
public void testBackspaceInsideItem() |
| 114 |
|
{ |
| 115 |
1 |
switchToSource(); |
| 116 |
1 |
setSourceText("* foo\n** b//arf//ar"); |
| 117 |
1 |
switchToWysiwyg(); |
| 118 |
|
|
| 119 |
1 |
moveCaret("document.body.firstChild.firstChild.lastChild.firstChild.lastChild", 1); |
| 120 |
1 |
typeBackspace(); |
| 121 |
1 |
assertContent("<ul><li>foo<ul><li>b<em>arf</em>r</li></ul></li></ul>"); |
| 122 |
|
|
| 123 |
1 |
typeBackspace(); |
| 124 |
1 |
assertContent("<ul><li>foo<ul><li>b<em>ar</em>r</li></ul></li></ul>"); |
| 125 |
|
} |
| 126 |
|
|
| 127 |
|
|
| 128 |
|
|
| 129 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 130 |
1 |
@Test... |
| 131 |
|
public void testDeleteInSameList() |
| 132 |
|
{ |
| 133 |
1 |
switchToSource(); |
| 134 |
1 |
setSourceText("* foo\n* bar"); |
| 135 |
1 |
switchToWysiwyg(); |
| 136 |
|
|
| 137 |
1 |
moveCaret("document.body.firstChild.firstChild.firstChild", 3); |
| 138 |
1 |
typeDelete(); |
| 139 |
1 |
assertContent("<ul><li>foobar</li></ul>"); |
| 140 |
|
} |
| 141 |
|
|
| 142 |
|
|
| 143 |
|
|
| 144 |
|
|
| 145 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 146 |
1 |
@Test... |
| 147 |
|
public void testBackspaceInSameList() |
| 148 |
|
{ |
| 149 |
1 |
switchToSource(); |
| 150 |
1 |
setSourceText("* foo\n* bar"); |
| 151 |
1 |
switchToWysiwyg(); |
| 152 |
|
|
| 153 |
1 |
moveCaret("document.body.firstChild.lastChild.firstChild", 0); |
| 154 |
1 |
typeBackspace(); |
| 155 |
1 |
assertContent("<ul><li>foobar</li></ul>"); |
| 156 |
|
} |
| 157 |
|
|
| 158 |
|
|
| 159 |
|
|
| 160 |
|
|
| 161 |
|
|
| |
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
| 162 |
0 |
public void failingTestDeleteInDifferentLists()... |
| 163 |
|
{ |
| 164 |
0 |
switchToSource(); |
| 165 |
0 |
setSourceText("* foo\n\n* bar"); |
| 166 |
0 |
switchToWysiwyg(); |
| 167 |
|
|
| 168 |
0 |
moveCaret("document.body.firstChild.firstChild.firstChild", 3); |
| 169 |
0 |
typeDelete(); |
| 170 |
0 |
assertContent("<ul><li>foo</li><li>bar</li></ul>"); |
| 171 |
|
} |
| 172 |
|
|
| 173 |
|
|
| 174 |
|
|
| 175 |
|
|
| 176 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 177 |
1 |
@Test... |
| 178 |
|
public void testBackspaceInDifferentLists() |
| 179 |
|
{ |
| 180 |
1 |
switchToSource(); |
| 181 |
1 |
setSourceText("* foo\n\n* bar"); |
| 182 |
1 |
switchToWysiwyg(); |
| 183 |
|
|
| 184 |
1 |
moveCaret("document.body.lastChild.firstChild.firstChild", 0); |
| 185 |
1 |
typeBackspace(); |
| 186 |
1 |
assertContent("<ul><li>foo</li><li>bar</li></ul>"); |
| 187 |
|
} |
| 188 |
|
|
| 189 |
|
|
| 190 |
|
|
| 191 |
|
|
| 192 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 193 |
1 |
@Test... |
| 194 |
|
public void testBackspaceInEmbeddedDocumentDifferentLists() |
| 195 |
|
{ |
| 196 |
1 |
switchToSource(); |
| 197 |
1 |
setSourceText("* foo\n* bar (((\n* foo 2\n1. bar 2)))"); |
| 198 |
1 |
switchToWysiwyg(); |
| 199 |
1 |
moveCaret("document.body.firstChild.childNodes[1].childNodes[1].childNodes[1].firstChild.firstChild", 0); |
| 200 |
1 |
typeBackspace(); |
| 201 |
1 |
assertContent("<ul><li>foo</li><li>bar<div><ul><li>foo 2</li><li>bar 2</li></ul></div></li></ul>"); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
|
| 205 |
|
|
| 206 |
|
|
| 207 |
|
|
| 208 |
|
|
| |
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
| 209 |
0 |
public void failingTestDeleteInEmbeddedDocumentDifferentLists()... |
| 210 |
|
{ |
| 211 |
0 |
switchToSource(); |
| 212 |
0 |
setSourceText("* foo\n* bar (((\n1. foo 2\n* bar 2)))"); |
| 213 |
0 |
switchToWysiwyg(); |
| 214 |
0 |
moveCaret("document.body.firstChild.childNodes[1].childNodes[1].firstChild.firstChild.firstChild", 5); |
| 215 |
0 |
typeDelete(); |
| 216 |
0 |
assertContent("<ul><li>foo</li><li>bar<div><ol><li>foo 2</li><li>bar 2</li></ol></div></li></ul>"); |
| 217 |
|
} |
| 218 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 219 |
1 |
@Test... |
| 220 |
|
public void testBackspaceInEmbeddedDocumentList() |
| 221 |
|
{ |
| 222 |
1 |
switchToSource(); |
| 223 |
1 |
setSourceText("* foo(((bar\n* foar)))"); |
| 224 |
1 |
switchToWysiwyg(); |
| 225 |
1 |
moveCaret("document.body.firstChild.firstChild.childNodes[1].childNodes[1].firstChild.firstChild", 0); |
| 226 |
1 |
typeBackspace(); |
| 227 |
1 |
assertContent("<ul><li>foo<div><p>bar</p>foar</div></li></ul>"); |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
|
| 231 |
|
|
| 232 |
|
|
| |
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 233 |
0 |
public void failingTestBackspaceAndDeleteToMergeEmbeddedDocumentListAndParagraph()... |
| 234 |
|
{ |
| 235 |
0 |
switchToSource(); |
| 236 |
0 |
setSourceText("* foo(((bar\n* foar)))"); |
| 237 |
0 |
switchToWysiwyg(); |
| 238 |
0 |
moveCaret("document.body.firstChild.firstChild.childNodes[1].childNodes[1].firstChild.firstChild", 0); |
| 239 |
0 |
typeBackspace(); |
| 240 |
0 |
typeDelete(); |
| 241 |
0 |
assertContent("<ul><li>foo<div><p>barfoar</p></div></li></ul>"); |
| 242 |
|
} |
| 243 |
|
|
| 244 |
|
|
| 245 |
|
|
| 246 |
|
|
| |
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
| 247 |
0 |
public void failingTestDeleteInEmbeddedDocumentList()... |
| 248 |
|
{ |
| 249 |
0 |
switchToSource(); |
| 250 |
0 |
setSourceText("* foo(((* bar\n\nfoar)))"); |
| 251 |
0 |
switchToWysiwyg(); |
| 252 |
0 |
moveCaret("document.body.firstChild.firstChild.childNodes[1].firstChild.firstChild.firstChild", 3); |
| 253 |
0 |
typeDelete(); |
| 254 |
0 |
assertContent("<ul><li>foo<div><ul><li>barfoar</li></ul></div></li></ul>"); |
| 255 |
|
} |
| 256 |
|
|
| 257 |
|
|
| 258 |
|
|
| 259 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 1 |
Complexity Density: 0.08 |
1PASS
|
|
| 260 |
1 |
@Test... |
| 261 |
|
public void testDeleteBeforeSublist() |
| 262 |
|
{ |
| 263 |
|
|
| 264 |
1 |
switchToSource(); |
| 265 |
1 |
setSourceText("* foo\n** bar\n"); |
| 266 |
1 |
switchToWysiwyg(); |
| 267 |
|
|
| 268 |
1 |
moveCaret("document.body.firstChild.firstChild.firstChild", 3); |
| 269 |
1 |
typeDelete(); |
| 270 |
1 |
assertContent("<ul><li>foobar</li></ul>"); |
| 271 |
|
|
| 272 |
|
|
| 273 |
1 |
switchToSource(); |
| 274 |
1 |
setSourceText("* foo\n** bar\n** far"); |
| 275 |
1 |
switchToWysiwyg(); |
| 276 |
|
|
| 277 |
1 |
moveCaret("document.body.firstChild.firstChild.firstChild", 3); |
| 278 |
1 |
typeDelete(); |
| 279 |
1 |
assertContent("<ul><li>foobar<ul><li>far</li></ul></li></ul>"); |
| 280 |
|
} |
| 281 |
|
|
| 282 |
|
|
| 283 |
|
|
| 284 |
|
|
| 285 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 1 |
Complexity Density: 0.08 |
1PASS
|
|
| 286 |
1 |
@Test... |
| 287 |
|
public void testBackspaceBeginSublist() |
| 288 |
|
{ |
| 289 |
|
|
| 290 |
1 |
switchToSource(); |
| 291 |
1 |
setSourceText("* foo\n** bar\n"); |
| 292 |
1 |
switchToWysiwyg(); |
| 293 |
|
|
| 294 |
1 |
moveCaret("document.body.firstChild.firstChild.lastChild.firstChild.firstChild", 0); |
| 295 |
1 |
typeBackspace(); |
| 296 |
1 |
assertContent("<ul><li>foobar</li></ul>"); |
| 297 |
|
|
| 298 |
|
|
| 299 |
1 |
switchToSource(); |
| 300 |
1 |
setSourceText("* foo\n** bar\n** far"); |
| 301 |
1 |
switchToWysiwyg(); |
| 302 |
|
|
| 303 |
1 |
moveCaret("document.body.firstChild.firstChild.lastChild.firstChild.firstChild", 0); |
| 304 |
1 |
typeBackspace(); |
| 305 |
1 |
assertContent("<ul><li>foobar<ul><li>far</li></ul></li></ul>"); |
| 306 |
|
} |
| 307 |
|
|
| 308 |
|
|
| 309 |
|
|
| 310 |
|
|
| 311 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 312 |
1 |
@Test... |
| 313 |
|
public void testDeleteDecreasesLevelWithEmptyItem() |
| 314 |
|
{ |
| 315 |
1 |
switchToSource(); |
| 316 |
1 |
setSourceText("* foo\n*** bar\n"); |
| 317 |
1 |
switchToWysiwyg(); |
| 318 |
|
|
| 319 |
1 |
moveCaret("document.body.firstChild.firstChild.firstChild", 3); |
| 320 |
1 |
typeDelete(); |
| 321 |
1 |
assertContent("<ul><li>foo<br><ul><li>bar</li></ul></li></ul>"); |
| 322 |
|
} |
| 323 |
|
|
| 324 |
|
|
| 325 |
|
|
| 326 |
|
|
| 327 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 328 |
1 |
@Test... |
| 329 |
|
public void testBackspaceDecreasesLevelWithEmptyItem() |
| 330 |
|
{ |
| 331 |
1 |
switchToSource(); |
| 332 |
1 |
setSourceText("* foo\n*** bar\n"); |
| 333 |
1 |
switchToWysiwyg(); |
| 334 |
|
|
| 335 |
1 |
moveCaret("document.body.firstChild.firstChild.lastChild.firstChild", 0); |
| 336 |
1 |
typeBackspace(); |
| 337 |
1 |
assertContent("<ul><li>foo<br><ul><li>bar</li></ul></li></ul>"); |
| 338 |
|
} |
| 339 |
|
|
| 340 |
|
|
| 341 |
|
|
| 342 |
|
|
| 343 |
|
@see |
| 344 |
|
|
| 345 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 346 |
1 |
@Test... |
| 347 |
|
public void testDeleteBeforePreviousLevelItem() |
| 348 |
|
{ |
| 349 |
1 |
switchToSource(); |
| 350 |
1 |
setSourceText("* foo\n** bar\n* bar minus one"); |
| 351 |
1 |
switchToWysiwyg(); |
| 352 |
|
|
| 353 |
1 |
moveCaret("document.body.firstChild.firstChild.lastChild.firstChild.firstChild", 3); |
| 354 |
1 |
typeDelete(); |
| 355 |
1 |
assertContent("<ul><li>foo<ul><li>barbar minus one</li></ul></li></ul>"); |
| 356 |
|
} |
| 357 |
|
|
| 358 |
|
|
| 359 |
|
|
| 360 |
|
|
| 361 |
|
|
| 362 |
|
@see |
| 363 |
|
|
| 364 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 365 |
1 |
@Test... |
| 366 |
|
public void testBackspaceAfterPreviousLevelItem() |
| 367 |
|
{ |
| 368 |
1 |
switchToSource(); |
| 369 |
1 |
setSourceText("* foo\n** bar\n* bar minus one"); |
| 370 |
1 |
switchToWysiwyg(); |
| 371 |
|
|
| 372 |
1 |
moveCaret("document.body.firstChild.lastChild.firstChild", 0); |
| 373 |
1 |
typeBackspace(); |
| 374 |
1 |
assertContent("<ul><li>foo<ul><li>barbar minus one</li></ul></li></ul>"); |
| 375 |
|
} |
| 376 |
|
|
| 377 |
|
|
| 378 |
|
|
| 379 |
|
|
| 380 |
|
|
| 381 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
1PASS
|
|
| 382 |
1 |
@Test... |
| 383 |
|
public void testDeleteAllTextInListItem() |
| 384 |
|
{ |
| 385 |
1 |
switchToSource(); |
| 386 |
1 |
setSourceText("* foo\n* b\n** ar"); |
| 387 |
1 |
switchToWysiwyg(); |
| 388 |
|
|
| 389 |
|
|
| 390 |
1 |
moveCaret("document.body.firstChild.lastChild.firstChild", 0); |
| 391 |
1 |
typeDelete(); |
| 392 |
|
|
| 393 |
1 |
assertContent("<ul><li>foo</li><li><br><ul><li>ar</li></ul></li></ul>"); |
| 394 |
|
|
| 395 |
1 |
moveCaret("document.body.firstChild.lastChild", 0); |
| 396 |
1 |
typeText("x"); |
| 397 |
1 |
assertContent("<ul><li>foo</li><li>x<br><ul><li>ar</li></ul></li></ul>"); |
| 398 |
|
|
| 399 |
1 |
typeDelete(); |
| 400 |
1 |
assertContent("<ul><li>foo</li><li>xar</li></ul>"); |
| 401 |
|
} |
| 402 |
|
|
| 403 |
|
|
| 404 |
|
|
| 405 |
|
|
| 406 |
|
|
| 407 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 1 |
Complexity Density: 0.08 |
1PASS
|
|
| 408 |
1 |
@Test... |
| 409 |
|
public void testBackspaceAllTextInListItem() |
| 410 |
|
{ |
| 411 |
1 |
switchToSource(); |
| 412 |
1 |
setSourceText("* foo\n* b\n** ar"); |
| 413 |
1 |
switchToWysiwyg(); |
| 414 |
|
|
| 415 |
|
|
| 416 |
1 |
moveCaret("document.body.firstChild.lastChild.firstChild", 1); |
| 417 |
1 |
typeBackspace(); |
| 418 |
|
|
| 419 |
1 |
assertContent("<ul><li>foo</li><li><br><ul><li>ar</li></ul></li></ul>"); |
| 420 |
|
|
| 421 |
1 |
moveCaret("document.body.firstChild.lastChild", 0); |
| 422 |
1 |
typeText("x"); |
| 423 |
1 |
assertContent("<ul><li>foo</li><li>x<br><ul><li>ar</li></ul></li></ul>"); |
| 424 |
|
|
| 425 |
1 |
moveCaret("document.body.firstChild.lastChild.lastChild.firstChild.firstChild", 0); |
| 426 |
|
|
| 427 |
1 |
typeBackspace(); |
| 428 |
1 |
assertContent("<ul><li>foo</li><li>xar</li></ul>"); |
| 429 |
|
} |
| 430 |
|
|
| 431 |
|
|
| 432 |
|
|
| 433 |
|
|
| 434 |
|
|
| |
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 1 |
Complexity Density: 0.08 |
|
| 435 |
0 |
public void failingTestDeleteBeforeParagraph()... |
| 436 |
|
{ |
| 437 |
0 |
switchToSource(); |
| 438 |
0 |
setSourceText("* one\n* two\n\nFoobar"); |
| 439 |
0 |
switchToWysiwyg(); |
| 440 |
|
|
| 441 |
|
|
| 442 |
0 |
moveCaret("document.body.firstChild.lastChild.firstChild", 3); |
| 443 |
0 |
typeDelete(); |
| 444 |
0 |
assertContent("<ul><li>one</li><li>twoFoobar</li></ul>"); |
| 445 |
|
|
| 446 |
|
|
| 447 |
0 |
switchToSource(); |
| 448 |
0 |
setSourceText("* one\n** two\n\nFoobar"); |
| 449 |
0 |
switchToWysiwyg(); |
| 450 |
|
|
| 451 |
|
|
| 452 |
0 |
moveCaret("document.body.firstChild.firstChild.lastChild.firstChild.firstChild", 3); |
| 453 |
0 |
typeDelete(); |
| 454 |
0 |
assertContent("<ul><li>one<ul><li>twoFoobar</li></ul></li></ul>"); |
| 455 |
|
} |
| 456 |
|
|
| 457 |
|
|
| 458 |
|
|
| 459 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 1 |
Complexity Density: 0.08 |
1PASS
|
|
| 460 |
1 |
@Test... |
| 461 |
|
public void testBackspaceAfterParagraph() |
| 462 |
|
{ |
| 463 |
1 |
switchToSource(); |
| 464 |
1 |
setSourceText("Foobar\n\n* one\n* two"); |
| 465 |
1 |
switchToWysiwyg(); |
| 466 |
|
|
| 467 |
|
|
| 468 |
1 |
moveCaret("document.body.lastChild.firstChild.firstChild", 0); |
| 469 |
1 |
typeBackspace(); |
| 470 |
1 |
assertContent("<p>Foobarone</p><ul><li>two</li></ul>"); |
| 471 |
|
|
| 472 |
|
|
| 473 |
|
|
| 474 |
|
|
| 475 |
1 |
switchToSource(); |
| 476 |
1 |
setSourceText("Foobar\n\n* one\n** two"); |
| 477 |
1 |
switchToWysiwyg(); |
| 478 |
|
|
| 479 |
|
|
| 480 |
1 |
moveCaret("document.body.lastChild.firstChild.firstChild", 0); |
| 481 |
1 |
typeBackspace(); |
| 482 |
1 |
assertContent("<p>Foobarone</p><ul><li><br><ul><li>two</li></ul></li></ul>"); |
| 483 |
|
} |
| 484 |
|
|
| 485 |
|
|
| 486 |
|
|
| 487 |
|
|
| 488 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 489 |
1 |
@Test... |
| 490 |
|
public void testDeleteSelectionPreserveSublists() |
| 491 |
|
{ |
| 492 |
1 |
switchToSource(); |
| 493 |
1 |
setSourceText("* one\n** two\n** three\n*** four\n*** five"); |
| 494 |
1 |
switchToWysiwyg(); |
| 495 |
|
|
| 496 |
|
|
| 497 |
1 |
select("document.body.firstChild.firstChild.firstChild", 2, |
| 498 |
|
"document.body.firstChild.firstChild.lastChild.lastChild.lastChild.firstChild.firstChild", 2); |
| 499 |
1 |
typeDelete(); |
| 500 |
1 |
assertContent("<ul><li>onur<ul><li><br><ul><li>five</li></ul></li></ul></li></ul>"); |
| 501 |
|
} |
| 502 |
|
|
| 503 |
|
|
| 504 |
|
|
| 505 |
|
|
| 506 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1PASS
|
|
| 507 |
1 |
@Test... |
| 508 |
|
public void testDeleteSelectionDeletesEnclosedSublists() |
| 509 |
|
{ |
| 510 |
1 |
switchToSource(); |
| 511 |
1 |
setSourceText("* one\n** two\n** three\n*** four\n** five\n* six"); |
| 512 |
1 |
switchToWysiwyg(); |
| 513 |
|
|
| 514 |
|
|
| 515 |
1 |
select("document.body.firstChild.firstChild.firstChild", 2, "document.body.firstChild.lastChild.firstChild", 1); |
| 516 |
1 |
typeDelete(); |
| 517 |
1 |
assertContent("<ul><li>onix</li></ul>"); |
| 518 |
|
} |
| 519 |
|
|
| 520 |
|
|
| 521 |
|
|
| 522 |
|
|
| 523 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 1 |
Complexity Density: 0.07 |
1PASS
|
|
| 524 |
1 |
@Test... |
| 525 |
|
public void testIndentNoSublist() |
| 526 |
|
{ |
| 527 |
1 |
typeText("1"); |
| 528 |
1 |
clickUnorderedListButton(); |
| 529 |
1 |
typeEnter(); |
| 530 |
1 |
typeText("2"); |
| 531 |
1 |
assertContent("<ul><li>1</li><li>2<br></li></ul>"); |
| 532 |
|
|
| 533 |
|
|
| 534 |
1 |
waitForPushButton(TOOLBAR_BUTTON_INDENT_TITLE, true); |
| 535 |
1 |
clickIndentButton(); |
| 536 |
1 |
assertContent("<ul><li>1<ul><li>2<br></li></ul></li></ul>"); |
| 537 |
|
|
| 538 |
1 |
waitForPushButton(TOOLBAR_BUTTON_INDENT_TITLE, false); |
| 539 |
1 |
moveCaret("document.body.firstChild.firstChild.childNodes[1].firstChild.firstChild", 0); |
| 540 |
1 |
typeTab(); |
| 541 |
|
|
| 542 |
1 |
assertContent("<ul><li>1<ul><li>2<br></li></ul></li></ul>"); |
| 543 |
|
|
| 544 |
1 |
switchToSource(); |
| 545 |
1 |
assertSourceText("* 1\n** 2"); |
| 546 |
|
} |
| 547 |
|
|
| 548 |
|
|
| 549 |
|
|
| 550 |
|
|
| 551 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (13) |
Complexity: 1 |
Complexity Density: 0.08 |
1PASS
|
|
| 552 |
1 |
@Test... |
| 553 |
|
public void testIndentUnderSublist() |
| 554 |
|
{ |
| 555 |
1 |
typeText("1"); |
| 556 |
1 |
clickUnorderedListButton(); |
| 557 |
1 |
typeEnter(); |
| 558 |
1 |
typeTextThenEnter("2"); |
| 559 |
1 |
typeTab(); |
| 560 |
1 |
typeTextThenEnter("+"); |
| 561 |
1 |
typeShiftTab(); |
| 562 |
1 |
typeText("3"); |
| 563 |
1 |
waitForPushButton(TOOLBAR_BUTTON_INDENT_TITLE, true); |
| 564 |
1 |
clickIndentButton(); |
| 565 |
1 |
assertContent("<ul><li>1</li><li>2<ul><li>+</li><li>3<br></li></ul></li></ul>"); |
| 566 |
1 |
switchToSource(); |
| 567 |
1 |
assertSourceText("* 1\n* 2\n** +\n** 3"); |
| 568 |
|
} |
| 569 |
|
|
| 570 |
|
|
| 571 |
|
|
| 572 |
|
|
| 573 |
|
@see |
| 574 |
|
@see |
| 575 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (26) |
Complexity: 1 |
Complexity Density: 0.04 |
1PASS
|
|
| 576 |
1 |
@Test... |
| 577 |
|
public void testIndentOutdentWithSublist() |
| 578 |
|
{ |
| 579 |
1 |
typeText("1"); |
| 580 |
1 |
clickUnorderedListButton(); |
| 581 |
1 |
typeEnter(); |
| 582 |
1 |
typeText("2"); |
| 583 |
|
|
| 584 |
|
|
| 585 |
1 |
waitForPushButton(TOOLBAR_BUTTON_INDENT_TITLE, true); |
| 586 |
1 |
clickIndentButton(); |
| 587 |
|
|
| 588 |
|
|
| 589 |
1 |
moveCaret("document.body.firstChild.firstChild.firstChild", 1); |
| 590 |
1 |
typeText("3"); |
| 591 |
1 |
moveCaret("document.body.firstChild.firstChild.firstChild", 1); |
| 592 |
1 |
typeEnter(); |
| 593 |
1 |
assertContent("<ul><li>1</li><li>3<ul><li>2<br></li></ul></li></ul>"); |
| 594 |
|
|
| 595 |
|
|
| 596 |
1 |
waitForPushButton(TOOLBAR_BUTTON_INDENT_TITLE, true); |
| 597 |
1 |
clickIndentButton(); |
| 598 |
1 |
assertContent("<ul><li>1<ul><li>3<ul><li>2<br></li></ul></li></ul></li></ul>"); |
| 599 |
1 |
switchToSource(); |
| 600 |
1 |
assertSourceText("* 1\n** 3\n*** 2"); |
| 601 |
1 |
switchToWysiwyg(); |
| 602 |
|
|
| 603 |
1 |
select("document.body.firstChild.firstChild.childNodes[1].firstChild.firstChild", 0, |
| 604 |
|
"document.body.firstChild.firstChild.childNodes[1].firstChild.firstChild", 1); |
| 605 |
|
|
| 606 |
|
|
| 607 |
1 |
waitForPushButton(TOOLBAR_BUTTON_OUTDENT_TITLE, true); |
| 608 |
1 |
clickOutdentButton(); |
| 609 |
1 |
assertContent("<ul><li>1</li><li>3<ul><li>2<br></li></ul></li></ul>"); |
| 610 |
1 |
moveCaret("document.body.firstChild.childNodes[1].childNodes[1].firstChild.firstChild", 0); |
| 611 |
1 |
clickOutdentButton(); |
| 612 |
1 |
assertContent("<ul><li>1</li><li>3</li><li>2<br></li></ul>"); |
| 613 |
1 |
switchToSource(); |
| 614 |
1 |
assertSourceText("* 1\n* 3\n* 2"); |
| 615 |
|
} |
| 616 |
|
|
| 617 |
|
|
| 618 |
|
|
| 619 |
|
|
| 620 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (13) |
Complexity: 1 |
Complexity Density: 0.08 |
1PASS
|
|
| 621 |
1 |
@Test... |
| 622 |
|
public void testOutdentOnFirstLevel() |
| 623 |
|
{ |
| 624 |
1 |
typeText("1"); |
| 625 |
1 |
clickUnorderedListButton(); |
| 626 |
1 |
typeEnter(); |
| 627 |
1 |
typeTextThenEnter("2"); |
| 628 |
1 |
typeTab(); |
| 629 |
1 |
typeTextThenEnter("+"); |
| 630 |
1 |
typeShiftTab(); |
| 631 |
1 |
typeText("3"); |
| 632 |
|
|
| 633 |
1 |
moveCaret("document.body.firstChild.childNodes[1].firstChild", 0); |
| 634 |
1 |
typeShiftTab(); |
| 635 |
1 |
assertContent("<ul><li>1</li></ul><p>2</p><ul><li>+</li><li>3<br></li></ul>"); |
| 636 |
1 |
switchToSource(); |
| 637 |
1 |
assertSourceText("* 1\n\n2\n\n* +\n* 3"); |
| 638 |
|
} |
| 639 |
|
|
| 640 |
|
|
| 641 |
|
|
| 642 |
|
|
| 643 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1PASS
|
|
| 644 |
1 |
@Test... |
| 645 |
|
public void testOutdentWithContentAfter() |
| 646 |
|
{ |
| 647 |
1 |
setContent("<ul><li>one<br>before<ul><li>two</li><li>three</li><li>four</li></ul>after</li></ul>"); |
| 648 |
1 |
moveCaret("document.body.firstChild.firstChild.childNodes[3].childNodes[1].firstChild", 0); |
| 649 |
|
|
| 650 |
1 |
waitForPushButton(TOOLBAR_BUTTON_OUTDENT_TITLE, true); |
| 651 |
1 |
clickOutdentButton(); |
| 652 |
1 |
assertContent("<ul><li>one<br>before<ul><li>two</li></ul></li><li>three<ul><li>four</li></ul>" |
| 653 |
|
+ "after</li></ul>"); |
| 654 |
|
} |
| 655 |
|
|
| 656 |
|
|
| 657 |
|
@see |
| 658 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (18) |
Complexity: 1 |
Complexity Density: 0.06 |
1PASS
|
|
| 659 |
1 |
@Test... |
| 660 |
|
public void testListDetection() |
| 661 |
|
{ |
| 662 |
1 |
switchToSource(); |
| 663 |
1 |
setSourceText("before\n\n" + "* unordered list item\n*1. ordered sub-list item\n\n" |
| 664 |
|
+ "1. ordered list item\n1*. unordered sub-list item"); |
| 665 |
1 |
switchToWysiwyg(); |
| 666 |
|
|
| 667 |
|
|
| 668 |
1 |
moveCaret("document.body.firstChild.firstChild", 3); |
| 669 |
1 |
waitForOrderedListDetected(false); |
| 670 |
1 |
waitForUnorderedListDetected(false); |
| 671 |
|
|
| 672 |
|
|
| 673 |
1 |
moveCaret("document.body.childNodes[1].firstChild.firstChild", 4); |
| 674 |
1 |
waitForOrderedListDetected(false); |
| 675 |
1 |
waitForUnorderedListDetected(true); |
| 676 |
|
|
| 677 |
1 |
moveCaret("document.body.childNodes[1].firstChild.lastChild.firstChild.firstChild", 7); |
| 678 |
1 |
waitForOrderedListDetected(true); |
| 679 |
1 |
waitForUnorderedListDetected(true); |
| 680 |
|
|
| 681 |
|
|
| 682 |
1 |
moveCaret("document.body.childNodes[2].firstChild.firstChild", 10); |
| 683 |
1 |
waitForOrderedListDetected(true); |
| 684 |
1 |
waitForUnorderedListDetected(false); |
| 685 |
|
|
| 686 |
1 |
moveCaret("document.body.childNodes[2].firstChild.lastChild.firstChild.firstChild", 9); |
| 687 |
1 |
waitForOrderedListDetected(true); |
| 688 |
1 |
waitForUnorderedListDetected(true); |
| 689 |
|
} |
| 690 |
|
|
| 691 |
|
|
| 692 |
|
@see |
| 693 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
1PASS
|
|
| 694 |
1 |
@Test... |
| 695 |
|
public void testCreateListInTableCell() |
| 696 |
|
{ |
| 697 |
1 |
insertTable(); |
| 698 |
1 |
typeText("a"); |
| 699 |
1 |
clickUnorderedListButton(); |
| 700 |
1 |
typeEnter(); |
| 701 |
1 |
typeText("b"); |
| 702 |
1 |
switchToSource(); |
| 703 |
1 |
assertSourceText("|=(((\n* a\n* b\n)))|= \n| | "); |
| 704 |
|
} |
| 705 |
|
|
| 706 |
|
|
| 707 |
|
|
| 708 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
1PASS
|
|
| 709 |
1 |
@Test... |
| 710 |
|
public void testIndentListFragment() |
| 711 |
|
{ |
| 712 |
1 |
switchToSource(); |
| 713 |
1 |
setSourceText("* one\n* two\n* three\n* three point one\n* three point two\n* three point three\n* four"); |
| 714 |
1 |
switchToWysiwyg(); |
| 715 |
1 |
select("document.body.firstChild.childNodes[3].firstChild", 0, "document.body.firstChild.childNodes[5].firstChild", 17); |
| 716 |
|
|
| 717 |
1 |
waitForPushButton(TOOLBAR_BUTTON_INDENT_TITLE, true); |
| 718 |
1 |
clickIndentButton(); |
| 719 |
1 |
switchToSource(); |
| 720 |
1 |
assertSourceText("* one\n* two\n* three\n** three point one\n** three point two\n** three point three\n* four"); |
| 721 |
|
} |
| 722 |
|
|
| 723 |
|
|
| 724 |
|
|
| 725 |
|
|
| 726 |
|
|
| 727 |
|
|
| 728 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 1 |
Complexity Density: 0.09 |
1PASS
|
|
| 729 |
1 |
@Test... |
| 730 |
|
public void testIndentParentWithNoSublist() |
| 731 |
|
{ |
| 732 |
1 |
switchToSource(); |
| 733 |
1 |
setSourceText("* one\n* two\n* three\n** three point one\n** three point two\n** three point three\n* four"); |
| 734 |
1 |
switchToWysiwyg(); |
| 735 |
1 |
select("document.body.firstChild.childNodes[2].firstChild", 0, "document.body.firstChild.childNodes[2].firstChild", 5); |
| 736 |
|
|
| 737 |
1 |
waitForPushButton(TOOLBAR_BUTTON_INDENT_TITLE, true); |
| 738 |
1 |
clickIndentButton(); |
| 739 |
1 |
select("document.body.firstChild.childNodes[1].childNodes[1].firstChild.childNodes[1].firstChild.firstChild", 0, |
| 740 |
|
"document.body.firstChild.childNodes[1].childNodes[1].firstChild.childNodes[1].childNodes[2].firstChild", 17); |
| 741 |
|
|
| 742 |
1 |
waitForPushButton(TOOLBAR_BUTTON_OUTDENT_TITLE, true); |
| 743 |
1 |
clickOutdentButton(); |
| 744 |
1 |
switchToSource(); |
| 745 |
1 |
assertSourceText("* one\n* two\n** three\n** three point one\n** three point two\n** three point three\n* four"); |
| 746 |
|
} |
| 747 |
|
|
| 748 |
|
|
| 749 |
|
|
| 750 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 1 |
Complexity Density: 0.07 |
1PASS
|
|
| 751 |
1 |
@Test... |
| 752 |
|
public void testIndentItemWithSublistAndOutdent() |
| 753 |
|
{ |
| 754 |
1 |
switchToSource(); |
| 755 |
1 |
setSourceText("* one\n* two\n* three\n** foo\n** bar\n* four\n* four\n* five"); |
| 756 |
1 |
switchToWysiwyg(); |
| 757 |
1 |
select("document.body.firstChild.childNodes[2].firstChild", 0, "document.body.firstChild.childNodes[3].firstChild", 4); |
| 758 |
|
|
| 759 |
1 |
waitForPushButton(TOOLBAR_BUTTON_INDENT_TITLE, true); |
| 760 |
1 |
clickIndentButton(); |
| 761 |
1 |
switchToSource(); |
| 762 |
1 |
assertSourceText("* one\n* two\n** three\n*** foo\n*** bar\n** four\n* four\n* five"); |
| 763 |
1 |
switchToWysiwyg(); |
| 764 |
1 |
select("document.body.firstChild.childNodes[1].childNodes[1].firstChild.firstChild", 0, |
| 765 |
|
"document.body.firstChild.childNodes[1].childNodes[1].firstChild.childNodes[1].childNodes[1].firstChild", 3); |
| 766 |
|
|
| 767 |
1 |
waitForPushButton(TOOLBAR_BUTTON_OUTDENT_TITLE, true); |
| 768 |
1 |
clickOutdentButton(); |
| 769 |
1 |
switchToSource(); |
| 770 |
1 |
assertSourceText("* one\n* two\n* three\n** foo\n** bar\n** four\n* four\n* five"); |
| 771 |
|
} |
| 772 |
|
|
| 773 |
|
|
| 774 |
|
|
| 775 |
|
|
| 776 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 1 |
Complexity Density: 0.07 |
1PASS
|
|
| 777 |
1 |
@Test... |
| 778 |
|
public void testIndentOutdentInTableCell() |
| 779 |
|
{ |
| 780 |
1 |
switchToSource(); |
| 781 |
1 |
setSourceText("|(((* item 1\n* item 2)))|(((* one\n** one plus one\n** one plus two\n* two\n* three)))\n| | "); |
| 782 |
1 |
switchToWysiwyg(); |
| 783 |
1 |
select( |
| 784 |
|
"document.body.firstChild.firstChild.firstChild.childNodes[1].firstChild.firstChild.firstChild.childNodes[1]." |
| 785 |
|
+ "childNodes[1].firstChild", 0, |
| 786 |
|
"document.body.firstChild.firstChild.firstChild.childNodes[1].firstChild.firstChild.childNodes[1]." |
| 787 |
|
+ "firstChild", 3); |
| 788 |
|
|
| 789 |
1 |
waitForPushButton(TOOLBAR_BUTTON_INDENT_TITLE, true); |
| 790 |
1 |
clickIndentButton(); |
| 791 |
1 |
switchToSource(); |
| 792 |
1 |
assertSourceText("|(((\n* item 1\n* item 2\n)))" |
| 793 |
|
+ "|(((\n* one\n** one plus one\n*** one plus two\n** two\n* three\n)))\n| | "); |
| 794 |
1 |
switchToWysiwyg(); |
| 795 |
1 |
select( |
| 796 |
|
"document.body.firstChild.firstChild.firstChild.childNodes[1].firstChild.firstChild.firstChild.childNodes[1]." |
| 797 |
|
+ "childNodes[1].firstChild", 0, |
| 798 |
|
"document.body.firstChild.firstChild.firstChild.childNodes[1].firstChild.firstChild.childNodes[1]." |
| 799 |
|
+ "firstChild", 5); |
| 800 |
|
|
| 801 |
1 |
waitForPushButton(TOOLBAR_BUTTON_OUTDENT_TITLE, true); |
| 802 |
1 |
clickOutdentButton(); |
| 803 |
1 |
switchToSource(); |
| 804 |
1 |
assertSourceText("|(((\n* item 1\n* item 2\n)))" |
| 805 |
|
+ "|(((\n* one\n** one plus one\n*** one plus two\n* two\n\nthree\n)))\n| | "); |
| 806 |
|
} |
| 807 |
|
|
| 808 |
|
|
| 809 |
|
|
| 810 |
|
|
| 811 |
|
|
| 812 |
|
|
| 813 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
1PASS
|
|
| 814 |
1 |
@Test... |
| 815 |
|
public void testOutdentFirstLevelPreservesLines() |
| 816 |
|
{ |
| 817 |
1 |
switchToSource(); |
| 818 |
1 |
setSourceText("* one\n* two\n* three\n** three plus one\n" |
| 819 |
|
+ "* four\n* (((before\n* inner five\n* inner five + 1\n\nafter)))\n* six"); |
| 820 |
1 |
switchToWysiwyg(); |
| 821 |
1 |
select("document.body.firstChild.firstChild.firstChild", 0, "document.body.firstChild.childNodes[5].firstChild", 3); |
| 822 |
|
|
| 823 |
1 |
waitForPushButton(TOOLBAR_BUTTON_OUTDENT_TITLE, true); |
| 824 |
1 |
clickOutdentButton(); |
| 825 |
1 |
switchToSource(); |
| 826 |
1 |
assertSourceText("one\n\ntwo\n\nthree\n\n* three plus one\n\nfour\n\n" |
| 827 |
|
+ "(((\nbefore\n\n* inner five\n* inner five + 1\n\nafter\n)))\n\nsix"); |
| 828 |
|
} |
| 829 |
|
|
| 830 |
|
|
| 831 |
|
|
| 832 |
|
|
| 833 |
|
|
| 834 |
|
|
| 835 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 1 |
Complexity Density: 0.11 |
1PASS
|
|
| 836 |
1 |
@Test... |
| 837 |
|
public void testBackspaceBetweenHeadingListItems() |
| 838 |
|
{ |
| 839 |
1 |
typeText("abc"); |
| 840 |
1 |
clickUnorderedListButton(); |
| 841 |
1 |
applyStyleTitle1(); |
| 842 |
1 |
moveCaret("document.body.firstChild.firstChild.firstChild.firstChild", 2); |
| 843 |
1 |
typeEnter(); |
| 844 |
1 |
typeBackspace(); |
| 845 |
|
|
| 846 |
1 |
assertContent("<ul><li><h1>ab</h1><h1>c</h1></li></ul>"); |
| 847 |
1 |
switchToSource(); |
| 848 |
1 |
assertSourceText("* (((\n= ab =\n\n= c =\n)))"); |
| 849 |
|
} |
| 850 |
|
|
| 851 |
|
|
| 852 |
|
|
| 853 |
|
|
| 854 |
|
|
| 855 |
|
|
| 856 |
|
|
| 857 |
|
|
| 858 |
|
|
| |
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 1 |
Complexity Density: 0.1 |
|
| 859 |
0 |
public void failingTestBackspaceAndDeleteToMergeHeadingListItems()... |
| 860 |
|
{ |
| 861 |
|
|
| 862 |
|
|
| 863 |
0 |
typeText("abc"); |
| 864 |
0 |
clickUnorderedListButton(); |
| 865 |
0 |
applyStyleTitle1(); |
| 866 |
0 |
moveCaret("document.body.firstChild.firstChild.firstChild.firstChild", 2); |
| 867 |
0 |
typeEnter(); |
| 868 |
0 |
typeBackspace(); |
| 869 |
0 |
typeDelete(); |
| 870 |
|
|
| 871 |
0 |
assertContent("<ul><li><h1>abc</h1></li></ul>"); |
| 872 |
0 |
switchToSource(); |
| 873 |
0 |
assertSourceText("* (((\n= abc =\n)))"); |
| 874 |
|
} |
| 875 |
|
|
| 876 |
|
|
| 877 |
|
|
| 878 |
|
|
| 879 |
|
|
| 880 |
|
|
| 881 |
|
|
| |
|
| 0% |
Uncovered Elements: 23 (23) |
Complexity: 1 |
Complexity Density: 0.04 |
|
| 882 |
0 |
public void failingTestDeleteBetweenHeadingListItems()... |
| 883 |
|
{ |
| 884 |
0 |
typeText("cba"); |
| 885 |
0 |
clickUnorderedListButton(); |
| 886 |
0 |
applyStyleTitle1(); |
| 887 |
0 |
moveCaret("document.body.firstChild.firstChild.firstChild.firstChild", 2); |
| 888 |
0 |
typeEnter(); |
| 889 |
0 |
moveCaret("document.body.firstChild.firstChild.firstChild.firstChild", 2); |
| 890 |
0 |
typeDelete(); |
| 891 |
|
|
| 892 |
0 |
assertContent("<ul><li><h1>cb</h1><h1>a</h1></li></ul>"); |
| 893 |
0 |
switchToSource(); |
| 894 |
0 |
assertSourceText("* (((\n= cb =\n\n= a =\n)))"); |
| 895 |
|
|
| 896 |
0 |
setSourceText(""); |
| 897 |
0 |
switchToWysiwyg(); |
| 898 |
|
|
| 899 |
|
|
| 900 |
0 |
typeText("cba"); |
| 901 |
0 |
clickUnorderedListButton(); |
| 902 |
0 |
applyStyleTitle1(); |
| 903 |
0 |
moveCaret("document.body.firstChild.firstChild.firstChild.firstChild", 2); |
| 904 |
0 |
typeEnter(); |
| 905 |
0 |
moveCaret("document.body.firstChild.firstChild.firstChild.firstChild", 2); |
| 906 |
0 |
typeDelete(); |
| 907 |
0 |
typeDelete(); |
| 908 |
|
|
| 909 |
0 |
assertContent("<ul><li><h1>cba</h1></li></ul>"); |
| 910 |
0 |
switchToSource(); |
| 911 |
0 |
assertSourceText("* (((\n= cba =\n)))"); |
| 912 |
|
} |
| 913 |
|
|
| 914 |
|
|
| 915 |
|
|
| 916 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 917 |
5 |
public void waitForOrderedListDetected(boolean down)... |
| 918 |
|
{ |
| 919 |
5 |
waitForToggleButtonState("Numbering On/Off", down); |
| 920 |
|
} |
| 921 |
|
|
| 922 |
|
|
| 923 |
|
|
| 924 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 925 |
5 |
public void waitForUnorderedListDetected(boolean down)... |
| 926 |
|
{ |
| 927 |
5 |
waitForToggleButtonState("Bullets On/Off", down); |
| 928 |
|
} |
| 929 |
|
} |