From 885fd2420b520f9b20c0bdadc022fc9301627e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20R=C5=AF=C5=BEi=C4=8Dka?= Date: Wed, 9 Mar 2022 11:43:19 +0100 Subject: [PATCH] Add tabs test --- tests/applications/system-settings/tabs.pm | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 tests/applications/system-settings/tabs.pm diff --git a/tests/applications/system-settings/tabs.pm b/tests/applications/system-settings/tabs.pm new file mode 100644 index 00000000..9cdf4f7e --- /dev/null +++ b/tests/applications/system-settings/tabs.pm @@ -0,0 +1,83 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This is to check that the tabs are responding. +# With these tabs it is not quite easy to test any of their functions +# because most of them apply when the operating system is used on +# the regular basis with some real data in it. +# They make less sense on a fresh system. + +sub run { + my $self = shift; + + # Check the Network tab + assert_and_click("settings_menu_network"); + assert_screen("settings_network_wired_connected"); + + # Check the Bluetooth tab (no Bluetooth device will be available) + assert_and_click("settings_menu_bluetooth"); + assert_screen("settings_bluetooth_no_bluetooth"); + + # Check the Online accounts + assert_and_click("settings_menu_online"); + assert_screen("settings_online_shown"); + + # Check the Sharing tab + assert_and_click("settings_menu_sharing"); + assert_screen("settings_sharing_shown_off"); + # Switch on Sharing + assert_and_click("settings_sharing_switch_on"); + assert_screen("settings_sharing_on"); + + # Check the Power tab + assert_and_click("settings_menu_power"); + assert_screen("settings_power_shown"); + + # Check the Displays tab + assert_and_click("settings_menu_displays"); + assert_screen("settings_displays_shown"); + + # Check the Mouse tab + assert_and_click("settings_menu_mouse"); + assert_screen("settings_mouse_shown"); + + # Check the Keyboard tab + assert_and_click("settings_menu_keyboard"); + assert_screen("settings_keyboard_shown"); + + # Check the Printers tab (No printers) + assert_and_click("settings_menu_printers"); + assert_screen("settings_printers_shown"); + + # Check the Removable tab + assert_and_click("settings_menu_removables"); + assert_screen("settings_removables_shown"); + + # Check the Color tab + assert_and_click("settings_menu_color"); + assert_screen("settings_color_shown"); + + # Check the Region tab + assert_and_click("settings_menu_region"); + assert_screen("settings_region_shown"); + + # Check the Defaults tab + assert_and_click("settings_menu_defaults"); + assert_screen("settings_defaults_shown"); + + # Check the About tab + assert_and_click("settings_menu_about"); + assert_screen("settings_about_shown"); + +} + +sub test_flags { + return {fatal => 1, milestone => 1}; +} + +1; + +# vim: set sw=4 et: +