~charlesk/unity8/lp-1410915-re-enable-rotation-lock-test

Viewing all changes in revision 1622.

  • Committer: CI Train Bot
  • Author(s): Michael Terry
  • Date: 2015-02-24 10:15:04 UTC
  • mfrom: (1432.6.56 greeter-refactor)
  • Revision ID: ci-train-bot@canonical.com-20150224101504-r428zccy160yhxq6
Refactor the greeter code to be more compartmented and isolatable.

This will help make it an optional piece of the shell when we allow a split greeter/shell.

My driving goals were:

- Remove as much logic from Shell.qml as possible. Right now, there is so much Greeter logic spread all throughout Shell.qml in different bits. For example, the Lockscreen widget sitting there instead of in qml/Greeter/.

- Clean up how we load the two different views (tablet & phone). Right now we have some widgets always present but sometimes hidden (Lockscreen) and Loaders within Loaders (LoginList inside GreeterContent). I wanted just two top-level view widgets that could be separately loaded depending on which mode we are in.

- Toward that end, I wanted to consolidate all the Greeter logic out of Shell and out of those two view classes to avoid duplication. So I made the main Greeter entry point widget handle all the login logic and interactions with LightDM. It controls the views, who always ask it to do things on their behalf. Classic MVC stuff.

- I separated out some of the widgetry from the previous Greeter class into a CoverPage class that both NarrowView and WideView use. This class now holds the drag handle for sliding the greeter away and the infographic.

- Now that each piece of the greeter has a much more brightly defined boundary, testing them in isolation is much easier. I've added tst_WideView, tst_NarrowView, and tst_Greeter files. I've moved existing tests around a bit and added some more. But it should be much more clear where a prospective test belongs now (logic tests in Greeter, visual tests in the respective View).

- I also moved some tests we had in qmluitests/ that were purely testing the LightDM plugin into their own plugin test file.
Approved by: Daniel d'Andrada

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: