2021-03-31 09:58:24 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
|
2024-08-02 23:03:10 +00:00
|
|
|
# This test cases automates Testcase_default_font_installation, see
|
|
|
|
# https://fedoraproject.org/wiki/QA:Testcase_default_font_installation
|
2021-03-31 09:58:24 +00:00
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
2024-08-02 23:03:10 +00:00
|
|
|
my $language = get_var("LANGUAGE");
|
|
|
|
my @supported = qw(japanese arabic);
|
|
|
|
return unless ($language ~~ @supported);
|
|
|
|
# we need to install the check tool
|
|
|
|
$self->root_console(tty => 3);
|
|
|
|
script_run("loadkeys us");
|
2024-08-07 14:33:06 +00:00
|
|
|
# repo setup before using dnf
|
|
|
|
repo_setup();
|
2024-08-02 23:03:10 +00:00
|
|
|
assert_script_run("dnf -y install fontquery");
|
|
|
|
# and give the user tty perms for later
|
|
|
|
assert_script_run("chmod 666 /dev/${serialdev}");
|
|
|
|
desktop_vt;
|
2021-03-31 09:58:24 +00:00
|
|
|
|
2022-07-28 20:32:57 +00:00
|
|
|
# On the console, the fonts might differ than in GUI.
|
2024-08-13 13:38:24 +00:00
|
|
|
# We will perform the tests in the gnome terminal.
|
2021-03-31 09:58:24 +00:00
|
|
|
# First, open it!
|
|
|
|
desktop_switch_layout 'ascii';
|
|
|
|
wait_still_screen(2);
|
|
|
|
|
2024-10-10 00:14:55 +00:00
|
|
|
desktop_launch_terminal;
|
2021-03-31 09:58:24 +00:00
|
|
|
# Similarly to _graphical_input.pm, repeat running the command
|
|
|
|
# if it fails the first time (it often does).
|
|
|
|
unless (check_screen "apps_run_terminal", 30) {
|
|
|
|
check_desktop;
|
2024-10-10 00:14:55 +00:00
|
|
|
desktop_launch_terminal;
|
2021-03-31 09:58:24 +00:00
|
|
|
}
|
|
|
|
assert_screen("apps_run_terminal");
|
2022-07-28 20:32:57 +00:00
|
|
|
wait_still_screen(stilltime => 5, similarity_level => 42);
|
2021-03-31 09:58:24 +00:00
|
|
|
|
2024-08-02 23:03:10 +00:00
|
|
|
# Run the test command
|
|
|
|
my %codes = ("japanese" => "ja", "arabic" => "ar");
|
|
|
|
my $code = $codes{$language};
|
|
|
|
my $release = lc(get_var("VERSION"));
|
|
|
|
assert_script_run("fontquery-diff -l ${code} ${release}", 300);
|
2021-03-31 09:58:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
|
|
|
return {fatal => 0};
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|