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

Xisco Fauli xiscofauli at libreoffice.org
Fri Jun 23 07:58:55 UTC 2023


Hi Regina,

I can do it. Just go ahead and push it once you think the patch is 
ready. Then I can create the UItests based on the scenarios described in 
your email.

On 21/6/23 19:20, Regina Henschel wrote:
> 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).

-- 
Xisco Faulí
LibreOffice QA Team
IRC: x1sc0



More information about the LibreOffice mailing list