2 * Copyright (C) 2015 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17#include "SessionsModel.h"
19#include <QLightDM/SessionsModel>
20#include <QtCore/QModelIndex>
24class GreeterSessionsModelTest : public QObject
32 model = new SessionsModel();
34 sourceModel = new QLightDM::SessionsModel();
44 void testIconDirectoriesAreValid()
46 Q_FOREACH(const QUrl& searchDirectory, model->iconSearchDirectories())
48 QVERIFY(searchDirectory.isValid());
52 void testMultipleSessionsCountIsCorrect()
54 sourceModel->setTestScenario("multipleSessions");
55 QVERIFY(sourceModel->rowCount(QModelIndex()) > 1);
58 void testNoSessionsCountIsCorrect()
60 sourceModel->setTestScenario("noSessions");
61 QVERIFY(sourceModel->rowCount(QModelIndex()) == 0);
64 void testSingleSessionCountIsCorrect()
66 sourceModel->setTestScenario("singleSession");
67 QVERIFY(sourceModel->rowCount(QModelIndex()) == 1);
72 QLightDM::SessionsModel *sourceModel;
75QTEST_MAIN(GreeterSessionsModelTest)
77#include "sessionsmodel.moc"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list