Unit test for bug fix tdf#155901 MCGR: preserve first and last gradient stop too

Regina Henschel rb.henschel at t-online.de
Wed Jun 21 17:20:56 UTC 2023


Hi all,

tdf#155901 MCGR: preserve first and last gradient stop too
https://gerrit.libreoffice.org/c/core/+/153395

fixes a bug in the Gradient tab of the Area dialog or the sidebar 
respectively. Because the test needs to act on the dialog, I do not see 
how to do that in a cppunit-test.

The below described scenarios has to be tested. Would someone be so kind 
and write a unit test? Or guide me how to do it? I'm working on Windows; 
I'm not sure whether it is possible on Windows at all.

Kind regards,
Regina


(A)
Open attached document.
Select the only shape.
Open Area dialog, e.g. from context menu.
Go to Area tab, if dialog is not already there.
Click on Gradient button, if not already active.
Change 'To color' field to e.g. White. OK.

Inspect the property 'FillGradient' of the shape.
Look at element [3] in its 'ColorStops' component. That is the last 
element in the sequence.
Assert that its 'StopOffset' attribute still has value 0.7
Whitout fix the value was 1. That means changing the color of the stop 
had changed its offset.
Look at element [0] in its 'ColorStops' component. That is the first 
element in the sequence.
Assert that its StopOffset attribute still has value 0.3
Without fix the value was 0.


(B)
Open attached document.
Select the only shape.
Go to properties pane of the sidebar.
If the 'Fill' list does not have 'Gradient' active, deselect the shape 
and select it again (an old bug not related to MCGR).
Change the 'Fill gradient to' field to White.

Inspect... same as in (A)


(C)
Open attached document.
Select the only shape.
Go to Gradient page of the Area dialog again.
Click the Add button.
A box opens to enter a name. Do that. Ok.

Inspect... same as in (A).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: source.fodp
Type: application/vnd.oasis.opendocument.presentation
Size: 67141 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20230621/b4a048d4/attachment-0001.odp>


More information about the LibreOffice mailing list