1 /*****************************************************************************
2 * Copyright (C) 2010-2011 by Frank Reininghaus (frank78ac@googlemail.com) *
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; either version 2 of the License, or *
7 * (at your option) any later version. *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 *****************************************************************************/
20 #ifndef DOLPHINVIEWTEST_ALLVIEWMODES
21 #define DOLPHINVIEWTEST_ALLVIEWMODES
25 #include "views/dolphinview.h"
28 * DolphinViewTest_AllViewModes is used as a base class for tests that check the
29 * basic functionality of DolphinView in all view modes. The derived classes
30 * have to provide implementations for the virtual methods mode() and verifyCorrectViewMode(),
33 * Tests for DolphinView functionality that is specific to a particular view mode or
34 * to switching between different view modes should not be added here, but to another
35 * DolphinView unit test.
38 class DolphinViewTest_AllViewModes
: public TestBase
44 DolphinViewTest_AllViewModes();
52 void testViewPropertySettings();
54 void testKeyboardFocus();
58 /** Returns the view mode (Icons, Details, Columns) to be used in the test. */
59 virtual DolphinView::Mode
mode() const = 0;
61 /** Should return true if the view mode is correct. */
62 virtual bool verifyCorrectViewMode() const = 0;
65 * Waits for the DolphinView's selectionChanged(const KFileItemList&) to be emitted
66 * and verifies that the number of selected items is as expected.
68 void verifySelectedItemsCount(int) const;