4
* This file is part of unity-2d
6
* Copyright 2011 Canonical Ltd.
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; version 3.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22
require '../run-tests.rb' unless $INIT_COMPLETED
24
require 'xdo/keyboard'
29
require $library_path + '/../../shell/input_shaping_common.rb'
33
############################# Test Suite #############################
34
context "Shell input shape tests" do
35
pwd = File.expand_path(File.dirname(__FILE__)) + '/'
37
# Run once at the beginning of this test suite
39
$SUT.execute_shell_command 'killall unity-2d-shell'
40
$SUT.execute_shell_command 'killall unity-2d-shell'
41
$SUT.execute_shell_command 'killall unity-2d-panel'
42
$SUT.execute_shell_command 'killall unity-2d-panel'
44
# Need panel running as position of shell depends on it
45
@@panel = $SUT.run(:name => UNITY_2D_PANEL,
46
:arguments => "-testability" )
48
# Minimize all windows
49
XDo::XWindow.toggle_minimize_all
52
# Run once at the end of this test suite
56
# Run before each test case begins
58
#Ensure mouse out of the way
59
XDo::Mouse.move(200,200,10,true)
61
# Execute the application
62
@app = $SUT.run(:name => UNITY_2D_SHELL,
63
:arguments => "-testability",
65
# Make certain application is ready for testing
66
verify(10){ @app.Launcher() }
69
# Run after each test case completes
71
$SUT.execute_shell_command 'pkill -nf unity-2d-shell'
74
#####################################################################################
77
test "Shape of launcher alone" do
78
test_shape_of_launcher_alone()
81
test "Shape of launcher and desktop mode dash" do
82
test_shape_of_launcher_and_desktop_mode_dash()
85
test "Shape of launcher and fullscreen mode dash" do
86
test_shape_of_launcher_and_fullscreen_mode_dash()
89
test "Shape of launcher and collapsed desktop mode dash" do
90
test_shape_of_launcher_and_collapsed_desktop_mode_dash()