Skip to content

Commit 1586b9f

Browse files
committed
Add additional tests showing position stability problems
1 parent 14190c2 commit 1586b9f

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

webodf/tests/ops/operationtests.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,4 +2119,42 @@
21192119
<office:text><text:p><text:span>A<c:anchor c:memberId="Joe"/></text:span><text:span text:style-name="auto63350368_0">B</text:span><text:span text:style-name="auto63350368_0">C<text:s> </text:s><text:s> </text:s>D<text:s> </text:s>E<c:cursor c:memberId="Joe"/></text:span><text:s> </text:s></text:p></office:text>
21202120
</after>
21212121
</test>
2122+
<test name="ApplyDirectStyling_AnnotatedRange_MaintainsCorrectCursorPosition" isFailing="true">
2123+
<before>
2124+
<office:text><text:p>ABC</text:p></office:text>
2125+
</before>
2126+
<ops>
2127+
<op optype="AddCursor" memberid="Alice"/>
2128+
<op optype="AddAnnotation" memberid="Alice" position="1" length="1" name="a" timestamp="1375706047061"/>
2129+
<op optype="MoveCursor" memberid="Alice" position="3" length="1"/>
2130+
<op optype="ApplyDirectStyling" memberid="Alice" position="3" length="1">
2131+
<setProperties><style:text-properties fo:font-weight="bold" /></setProperties>
2132+
</op>
2133+
</ops>
2134+
<after>
2135+
<office:text><text:p>A<office:annotation office:name="a"><dc:creator e:memberid="Alice">Alice</dc:creator><dc:date>2013-08-05T12:34:07.061Z</dc:date><text:list><text:list-item><text:p/></text:list-item></text:list></office:annotation><text:span text:style-name="auto63350368_0"><c:anchor c:memberId="Alice"/>B<c:cursor c:memberId="Alice"/></text:span><office:annotation-end office:name="a"/>C</text:p></office:text>
2136+
</after>
2137+
</test>
2138+
<test name="RemoveText_AnnotatedRange_MaintainsCorrectCursorPosition" isFailing="true">
2139+
<before>
2140+
<office:text><text:p>AB<html:span class="webodf-annotationHighlight"/>CD</text:p></office:text>
2141+
</before>
2142+
<ops>
2143+
<op optype="AddCursor" memberid="Alice"/>
2144+
<op optype="AddAnnotation" memberid="Alice" position="3" length="0" name="b" timestamp="1375706047061"/>
2145+
<op optype="AddAnnotation" memberid="Alice" position="1" length="2" name="a" timestamp="1375706047061"/>
2146+
<op optype="ApplyDirectStyling" memberid="Alice" position="4" length="1">
2147+
<setProperties><style:text-properties fo:font-style="italic" /></setProperties>
2148+
</op>
2149+
<op optype="ApplyDirectStyling" memberid="Alice" position="3" length="2">
2150+
<setProperties><style:text-properties fo:font-weight="bold" /></setProperties>
2151+
</op>
2152+
<op optype="MoveCursor" memberid="Alice" position="3" length="2"/>
2153+
<op optype="RemoveText" memberid="Alice" position="3" length="2"/>
2154+
<op optype="InsertText" memberid="Alice" position="3" text="1" moveCursor="true"/>
2155+
</ops>
2156+
<after>
2157+
<office:text><text:p>A<office:annotation office:name="a"><dc:creator e:memberid="Alice">Alice</dc:creator><dc:date>2013-08-05T12:34:07.061Z</dc:date><text:list><text:list-item><text:p/></text:list-item></text:list></office:annotation><html:span class="webodf-annotationHighlight">1<c:cursor c:memberId="Alice"/></html:span><office:annotation-end office:name="a"/><office:annotation office:name="b"><dc:creator e:memberid="Alice">Alice</dc:creator><dc:date>2013-08-05T12:34:07.061Z</dc:date><text:list><text:list-item><text:p/></text:list-item></text:list></office:annotation>D</text:p></office:text>
2158+
</after>
2159+
</test>
21222160
</tests>

0 commit comments

Comments
 (0)