Add GNOME screen recording test #505

Merged
adamwill merged 1 commit from newtest/screen_recording into main 2026-04-17 20:21:33 +00:00
20 changed files with 233 additions and 0 deletions

View file

@ -0,0 +1,19 @@
{
"area": [
{
"xpos": 247,
"ypos": 148,
"width": 99,
"height": 85,
"type": "match",
"click_point": {
"xpos": 49.5,
"ypos": 22.5
}
}
],
"properties": [],
"tags": [
"nautilus_subdirectory_screencasts"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 888,
"ypos": 4,
"width": 25,
"height": 24,
"type": "match"
}
],
"properties": [],
"tags": [
"panel_icon_stoprecording"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 488,
"ypos": 571,
"width": 48,
"height": 53,
"type": "match"
}
],
"properties": [],
"tags": [
"screenshot_icon_recordscreen"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -0,0 +1,19 @@
{
"area": [
{
"xpos": 619,
"ypos": 657,
"width": 36,
"height": 32,
"type": "match",
"click_point": {
"xpos": 18,
"ypos": 16
}
}
],
"properties": [],
"tags": [
"screenshot_icon_showcursor"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 266,
"ypos": 81,
"width": 156,
"height": 22,
"type": "match"
}
],
"properties": [],
"tags": [
"screenshot_screencast_recorded"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 74,
"ypos": 144,
"width": 42,
"height": 52,
"type": "match"
}
],
"properties": [],
"tags": [
"screenshot_video_playing"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View file

@ -0,0 +1,16 @@
{
"area": [
{
"type": "match",
"height": 52,
"width": 42,
"ypos": 299,
"xpos": 74,
"match": 90
}
],
"properties": [],
"tags": [
"screenshot_video_playing"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

View file

@ -0,0 +1,16 @@
{
"area": [
{
"ypos": 144,
"xpos": 74,
"width": 42,
"height": 52,
"type": "match",
"match": 90
}
],
"properties": [],
"tags": [
"screenshot_video_playing"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View file

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 239,
"ypos": 205,
"width": 119,
"height": 20,
"type": "match"
}
],
"properties": [],
"tags": [
"gnome_filedialog_video_select"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -1273,6 +1273,18 @@
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
}
},
"screen_recording": {
"profile_groups": {
"workstation-sb-all": 40,
"eln-gnome-lives": 40
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"POSTINSTALL_PATH": "tests/applications/screen_recording",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
}
},
"sysmon": {
"profile_groups": {
"workstation-sb-all": 40,

View file

@ -0,0 +1,76 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This test verifies GNOME screen recording functionality on Wayland.
# It opens the screenshot overlay, starts and stops a screen recording,
# and verifies the output file exists.
sub run {
my $self = shift;
# On Silverblue (or possibly other CANNED systems),
# Showtime, the video player, which we use to check
# that the video has been recorded, might not be installed
# by default, so we need to check and install it if that's
# the case.
if (get_var("CANNED")) {
# Switch to console
$self->root_console(tty => 3);
if (script_run("flatpak info org.gnome.Showtime")) {
record_soft_failure("Showtime not installed by default.");
assert_script_run("flatpak install -y org.gnome.Showtime", timeout => 600);
}
desktop_vt();
}
# The recording process will record running a couple of commands
# in gnome-terminal. The recording application is invoked with
# a shortcut, then mouse is used to click out the recording
# details. After the commands are passed on the terminal, the recording
# is terminated and we check that the video exists.
menu_launch_type("terminal", checkstart => 1, maximize => 1);
wait_still_screen(2);
# Start the recording
send_key("ctrl-alt-shift-r");
assert_and_click("screenshot_icon_recordscreen");
assert_and_click("screenshot_icon_showcursor");
send_key("spc");
assert_screen("panel_icon_stoprecording", timeout => 10);
# Perform actions on the terminal.
type_very_safely("whoami\n");
sleep(1);
type_very_safely("uname -r\n");
sleep(1);
type_very_safely("exit\n");
wait_still_screen(3);
# Stop the recording and check if confirmation pop-up jumps out.
assert_and_click("panel_icon_stoprecording");
unless (check_screen("screenshot_screencast_recorded", timeout => 3)) {
record_soft_failure("Screencast recorded pop-up has not been shown!");
}
wait_still_screen(3);
# Verify the recording was saved to ~/Videos/Screencasts/
menu_launch_type("nautilus", checkstart => 1, maximize => 1);
assert_and_click("nautilus_directory_videos");
assert_and_dclick("nautilus_subdirectory_screencasts");
wait_still_screen(2);
assert_and_dclick("gnome_filedialog_video_select");
sleep(14);
send_key("spc");
assert_screen("screenshot_video_playing");
}
sub test_flags {
return {fatal => 1};
}
1;
# vim: set sw=4 et: