CHANGE_TESTS = { 'id': 'C', 'caption': 'Change Existing Format to Different Format Tests', 'checkAttrs': True, 'checkStyle': True, 'styleWithCSS': False, 'Proposed': [ { 'desc': '', 'command': '', 'tests': [ ] }, { 'desc': '[HTML5] italic', 'command': 'italic', 'tests': [ { 'id': 'I_I-1_SL', 'desc': 'Italicize partially italicized text', 'pad': 'foo[barbaz]qoz', 'expected': 'foo[barbaz]qoz' }, { 'id': 'I_B-I-1_SO', 'desc': 'Italicize partially italicized text in bold context', 'pad': 'foo[barbaz}', 'expected': 'foo[barbaz]' } ] }, { 'desc': '[HTML5] underline', 'command': 'underline', 'tests': [ { 'id': 'U_U-1_SO', 'desc': 'Underline partially underlined text', 'pad': 'foo[barbazqoz]quz', 'expected': 'foo[barbazqoz]quz' }, { 'id': 'U_U-1_SL', 'desc': 'Underline partially underlined text', 'pad': 'foo[barbaz]qozquz', 'expected': 'foo[barbaz]qozquz' }, { 'id': 'U_S-U-1_SO', 'desc': 'Underline partially underlined text in striked context', 'pad': 'foo[barbaz}', 'expected': 'foo[barbaz]' } ] }, { 'desc': '[MIDAS] backcolor', 'command': 'backcolor', 'tests': [ { 'id': 'BC:842_FONTs:bc:fca-1_SW', 'rte1-id': 'c-backcolor-0', 'desc': 'Change background color to new color', 'value': '#884422', 'pad': '[foobarbaz]', 'expected': [ '[foobarbaz]', '[foobarbaz]' ] }, { 'id': 'BC:00f_SPANs:bc:f00-1_SW', 'rte1-id': 'c-backcolor-2', 'desc': 'Change background color to new color', 'value': '#0000ff', 'pad': '[foobarbaz]', 'expected': [ '[foobarbaz]', '[foobarbaz]' ] }, { 'id': 'BC:ace_FONT.ass.s:bc:rgb-1_SW', 'rte1-id': 'c-backcolor-1', 'desc': 'Change background color in styled span to new color', 'value': '#aaccee', 'pad': '[foobarbaz]', 'expected': [ '[foobarbaz]', '[foobarbaz]' ] } ] }, { 'desc': '[MIDAS] forecolor', 'command': 'forecolor', 'tests': [ { 'id': 'FC:g_FONTc:b-1_SW', 'rte1-id': 'c-forecolor-0', 'desc': 'Change the text color (without CSS)', 'value': 'green', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' }, { 'id': 'FC:g_SPANs:c:g-1_SW', 'rte1-id': 'c-forecolor-1', 'desc': 'Change the text color from a styled span (without CSS)', 'value': 'green', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' }, { 'id': 'FC:g_FONTc:b.s:c:r-1_SW', 'rte1-id': 'c-forecolor-2', 'desc': 'Change the text color from conflicting color and style (without CSS)', 'value': 'green', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' }, { 'id': 'FC:g_FONTc:b.sz:6-1_SI', 'desc': 'Change the font color in content with a different font size and font color', 'value': 'green', 'pad': 'foo[bar]baz', 'expected': [ 'foo[bar]baz', 'foo[bar]baz' ] } ] }, { 'desc': '[MIDAS] hilitecolor', 'command': 'hilitecolor', 'tests': [ { 'id': 'HC:g_FONTs:c:b-1_SW', 'rte1-id': 'c-hilitecolor-0', 'desc': 'Change the hilite color (without CSS)', 'value': 'green', 'pad': '[foobarbaz]', 'expected': [ '[foobarbaz]', '[foobarbaz]' ] }, { 'id': 'HC:g_SPANs:c:g-1_SW', 'rte1-id': 'c-hilitecolor-2', 'desc': 'Change the hilite color from a styled span (without CSS)', 'value': 'green', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' }, { 'id': 'HC:g_SPAN.ass.s:c:rgb-1_SW', 'rte1-id': 'c-hilitecolor-1', 'desc': 'Change the hilite color from a styled span (without CSS)', 'value': 'green', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' } ] }, { 'desc': '[MIDAS] fontname', 'command': 'fontname', 'tests': [ { 'id': 'FN:c_FONTf:a-1_SW', 'rte1-id': 'c-fontname-0', 'desc': 'Change existing font name to new font name (without CSS)', 'value': 'courier', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' }, { 'id': 'FN:c_SPANs:ff:a-1_SW', 'rte1-id': 'c-fontname-1', 'desc': 'Change existing font name from style to new font name (without CSS)', 'value': 'courier', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' }, { 'id': 'FN:c_FONTf:a.s:ff:v-1_SW', 'rte1-id': 'c-fontname-2', 'desc': 'Change existing font name with conflicting face and style to new font name (without CSS)', 'value': 'courier', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' }, { 'id': 'FN:c_FONTf:a-1_SI', 'desc': 'Change existing font name to new font name, text partially selected', 'value': 'courier', 'pad': 'foo[bar]baz', 'expected': 'foo[bar]baz', 'accept': 'foo[bar]baz' }, { 'id': 'FN:c_FONTf:a-2_SL', 'desc': 'Change existing font name to new font name, using CSS styling', 'value': 'courier', 'pad': 'foo[barbaz]qoz', 'expected': 'foo[barbaz]qoz' }, { 'id': 'FN:c_FONTf:v-FONTf:a-1_SW', 'rte1-id': 'c-fontname-3', 'desc': 'Change existing font name in nested tags to new font name (without CSS)', 'value': 'courier', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]', 'accept': '[foobarbaz]' }, { 'id': 'FN:c_SPANs:ff:v-FONTf:a-1_SW', 'rte1-id': 'c-fontname-4', 'desc': 'Change existing font name in nested mixed tags to new font name (without CSS)', 'value': 'courier', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]', 'accept': '[foobarbaz]' } ] }, { 'desc': '[MIDAS] fontsize', 'command': 'fontsize', 'tests': [ { 'id': 'FS:1_FONTsz:4-1_SW', 'rte1-id': 'c-fontsize-0', 'desc': 'Change existing font size to new size (without CSS)', 'value': '1', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' }, { 'id': 'FS:1_SPAN.ass.s:fs:large-1_SW', 'rte1-id': 'c-fontsize-1', 'desc': 'Change existing font size from styled span to new size (without CSS)', 'value': '1', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' }, { 'id': 'FS:5_FONTsz:1.s:fs:xs-1_SW', 'rte1-id': 'c-fontsize-2', 'desc': 'Change existing font size from tag with conflicting size and style to new size (without CSS)', 'value': '5', 'pad': '[foobarbaz]', 'expected': '[foobarbaz]' }, { 'id': 'FS:2_FONTc:b.sz:6-1_SI', 'desc': 'Change the font size in content with a different font size and font color', 'value': '2', 'pad': 'foo[bar]baz', 'expected': [ 'foo[bar]baz', 'foo[bar]baz' ] }, { 'id': 'FS:larger_FONTsz:4', 'desc': 'Change selection to use next larger font', 'value': 'larger', 'pad': 'foo[bar]baz', 'expected': 'foo[bar]baz', 'accept': 'foo[bar]baz' }, { 'id': 'FS:smaller_FONTsz:4', 'desc': 'Change selection to use next smaller font', 'value': 'smaller', 'pad': 'foo[bar]baz', 'expected': 'foo[bar]baz', 'accept': 'foo[bar]baz' } ] }, { 'desc': '[MIDAS] formatblock', 'command': 'formatblock', 'tests': [ { 'id': 'FB:h1_ADDRESS-1_SW', 'desc': 'change block from
to

', 'value': 'h1', 'pad': '
foo [bar] baz
', 'expected': '

foo [bar] baz

' }, { 'id': 'FB:h1_ADDRESS-FONTsz:4-1_SO', 'desc': 'change block from
with partially formatted content to

', 'value': 'h1', 'pad': '
foo [bar] baz
', 'expected': '

foo [bar] baz

' }, { 'id': 'FB:h1_ADDRESS-FONTsz:4-1_SW', 'desc': 'change block from
with partially formatted content to

', 'value': 'h1', 'pad': '
foo [bar] baz
', 'expected': '

foo [bar] baz

' }, { 'id': 'FB:h1_ADDRESS-FONT.ass.sz:4-1_SW', 'desc': 'change block from
with partially formatted content to

', 'value': 'h1', 'pad': '
foo [bar] baz
', 'expected': '

foo [bar] baz

' } ] } ] }