[autotests] Test ScriptedEffects stackingOrder stackingOrder is an interesting property which needed special handling in the port. Add an explicit test.
ClosedPublic

Authored by davidedmundson on Aug 1 2018, 11:29 AM.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Aug 1 2018, 11:29 AM
Restricted Application added a project: KWin. · View Herald TranscriptAug 1 2018, 11:29 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Aug 1 2018, 11:29 AM
zzag added a subscriber: zzag.EditedAug 1 2018, 11:50 AM

If the stackingOrder property needs special handing, shouldn't we have another test(i.e. test function)? (just a question)

autotests/integration/effects/scripts/effectsHandler.js
3
var currentStackingOrder = effects.stackingOrder
    .map(function (window) { return window.caption; })
    .join();
sendTestResponse("stackingOrder - " + effects.stackingOrder.length + " " + currentStackingOrder);

I think it would be better.

shouldn't we have another test? (just a question)

I don't think we gain anything.
At the end of the day things either pass or they don't.

autotests/integration/effects/scripts/effectsHandler.js
3

If this was "real" code, absolutely. It would be wrong to have any unchecked array access.

But for a test, if you had anything other than 1 window we're going to abort anyway, and in unit tests I want to get errors.

broulik accepted this revision.Aug 8 2018, 10:55 AM
This revision is now accepted and ready to land.Aug 8 2018, 10:55 AM
This revision was automatically updated to reflect the committed changes.