diff --git a/Makefile b/Makefile
index 89ee1cb..4931975 100644
--- a/Makefile
+++ b/Makefile
@@ -16,8 +16,8 @@ LOCALES_MO = $(patsubst po/%.po,locale/%/LC_MESSAGES/$(NAME).mo,$(LOCALES_PO
ZIP_CONTENT = $(JS_FILES) $(LOCALES_MO) resources/$(NAME).gresource \
schemas/gschemas.compiled metadata.json LICENSE
-# These five recipes can be invoked by the user.
-.PHONY: zip install uninstall pot clean
+# These seven recipes can be invoked by the user.
+.PHONY: zip install uninstall pot clean test references
# The zip recipes only bundles the extension without installing it.
zip: $(ZIP_NAME)
@@ -41,6 +41,28 @@ pot: $(JS_FILES) $(UI_FILES)
--output=po/$(NAME).pot \
$(JS_FILES) $(UI_FILES)
+# This runs several tests in containerized versions of GNOME Shell.
+test:
+ @ for version in 32 33 34 35 36 ; do \
+ for session in "gnome-xsession" "gnome-wayland-nested" ; do \
+ echo ; \
+ echo "Running Tests on Fedora $$version ($$session)." ; \
+ echo ; \
+ ./tests/run-test.sh -s $$session -v $$version ; \
+ done \
+ done
+
+# This re-generates all reference images required by the tests.
+references:
+ @ for version in 32 33 34 35 36 ; do \
+ for session in "gnome-xsession" "gnome-wayland-nested" ; do \
+ echo ; \
+ echo "Generating References for Fedora $$version ($$session)." ; \
+ echo ; \
+ ./tests/generate-references.sh -s $$session -v $$version ; \
+ done \
+ done
+
# This removes all temporary files created with the other recipes.
clean:
rm -rf $(ZIP_NAME) \
diff --git a/docs/changelog.md b/docs/changelog.md
index df50851..2393d83 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -1,5 +1,13 @@
# Changelog of the Burn-My-Windows Extension
+## [Burn My Window 13](https://github.com/schneegans/Burn-My-Windows/releases/tag/v13)
+
+**Release Date:** TBD
+
+#### Enhancements
+
+* The continuous integration tests have been significantly enhanced. Now, all window-open and window-close animations are visually tested on all supported GNOME versions and on X11 / Wayland (summing up to a total of 136 test cases).
+
## [Burn My Window 12](https://github.com/schneegans/Burn-My-Windows/releases/tag/v12)
**Release Date:** 2022-02-19
diff --git a/extension.js b/extension.js
index ccaaec4..4ae77d5 100644
--- a/extension.js
+++ b/extension.js
@@ -381,11 +381,16 @@ class Extension {
// ----------------------------------------------------------- tweak actor transitions
+ // If we are currently performing integration test, all animations are set to a fixed
+ // duration and show a fixed frame from the middle of the animation.
+ const testMode = this._settings.get_boolean('test-mode');
+
// The following is used to tweak the ongoing transitions of a window actor. Usually
// windows are faded in / out scaled up / down slightly by GNOME Shell. Here, we allow
// modifications to this behavior by the effects.
const config = this._currentEffect.tweakTransition(actor, this._settings, forOpening);
- const duration =
+ const duration = testMode ?
+ 5000 :
this._settings.get_int(this._currentEffect.getNick() + '-animation-time');
// All animations are relative to the window's center.
@@ -416,9 +421,10 @@ class Extension {
// Tweak the transition according to the config object. For some reason, there are
// rare cases, where no transition is set up. This happens from time to time...
if (transition) {
+ const middle = (config[property].to + config[property].from) / 2;
transition.set_duration(duration);
- transition.set_to(config[property].to);
- transition.set_from(config[property].from);
+ transition.set_to(testMode ? middle : config[property].to);
+ transition.set_from(testMode ? middle : config[property].from);
transition.set_progress_mode(config[property].mode);
}
}
@@ -454,8 +460,9 @@ class Extension {
// Update uniforms at each frame.
transition.connect('new-frame', (t) => {
- shader.set_uniform_value('uProgress', t.get_progress());
- shader.set_uniform_value('uTime', 0.001 * t.get_elapsed_time());
+ shader.set_uniform_value('uProgress', testMode ? 0.5 : t.get_progress());
+ shader.set_uniform_value(
+ 'uTime', testMode ? duration / 2 : 0.001 * t.get_elapsed_time());
shader.set_uniform_value('uSizeX', actor.width);
shader.set_uniform_value('uSizeY', actor.height);
});
diff --git a/schemas/org.gnome.shell.extensions.burn-my-windows.gschema.xml b/schemas/org.gnome.shell.extensions.burn-my-windows.gschema.xml
index 4631aca..4d3d3a5 100644
--- a/schemas/org.gnome.shell.extensions.burn-my-windows.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.burn-my-windows.gschema.xml
@@ -25,6 +25,12 @@
The effect with this nick will be used for the next window-open animation.
+
+ false
+ Test Mode
+ If set to true, all animations will show only one still frame to allow for continuous integration tests.
+
+
diff --git a/src/BrokenGlass.js b/src/BrokenGlass.js
index 6171ca0..184a86d 100644
--- a/src/BrokenGlass.js
+++ b/src/BrokenGlass.js
@@ -150,6 +150,9 @@ if (utils.isInShellProcess()) {
epicenterY = localY / actor.height;
}
+ // If we are currently performing integration test, the animation uses a fixed seed.
+ const testMode = settings.get_boolean('test-mode');
+
this.set_shader_source(`
// Inject some common shader snippets.
@@ -157,7 +160,8 @@ if (utils.isInShellProcess()) {
uniform sampler2D uShardTexture;
- const vec2 SEED = vec2(${Math.random()}, ${Math.random()});
+ const vec2 SEED = vec2(${testMode ? 0 : Math.random()},
+ ${testMode ? 0 : Math.random()});
const float SHARD_SCALE = ${settings.get_double('broken-glass-scale')};
const float SHARD_LAYERS = 5;
const float BLOW_FORCE = ${settings.get_double('broken-glass-blow-force')};
diff --git a/src/EnergizeA.js b/src/EnergizeA.js
index 79d8c5d..56a75b1 100644
--- a/src/EnergizeA.js
+++ b/src/EnergizeA.js
@@ -117,6 +117,9 @@ if (utils.isInShellProcess()) {
const color = Clutter.Color.from_string(settings.get_string('energize-a-color'))[1];
+ // If we are currently performing integration test, the animation uses a fixed seed.
+ const testMode = settings.get_boolean('test-mode');
+
this.set_shader_source(`
// Inject some common shader snippets.
@@ -124,7 +127,8 @@ if (utils.isInShellProcess()) {
${shaderSnippets.noise()}
${shaderSnippets.edgeMask()}
- const vec2 SEED = vec2(${Math.random()}, ${Math.random()});
+ const vec2 SEED = vec2(${testMode ? 0 : Math.random()},
+ ${testMode ? 0 : Math.random()});
const float FADE_IN_TIME = 0.3;
const float FADE_OUT_TIME = 0.6;
const float HEART_FADE_TIME = 0.3;
diff --git a/src/EnergizeB.js b/src/EnergizeB.js
index 9d64d71..6bddbb0 100644
--- a/src/EnergizeB.js
+++ b/src/EnergizeB.js
@@ -117,6 +117,9 @@ if (utils.isInShellProcess()) {
const color = Clutter.Color.from_string(settings.get_string('energize-b-color'))[1];
+ // If we are currently performing integration test, the animation uses a fixed seed.
+ const testMode = settings.get_boolean('test-mode');
+
this.set_shader_source(`
// Inject some common shader snippets.
@@ -124,7 +127,8 @@ if (utils.isInShellProcess()) {
${shaderSnippets.noise()}
${shaderSnippets.edgeMask()}
- const vec2 SEED = vec2(${Math.random()}, ${Math.random()});
+ const vec2 SEED = vec2(${testMode ? 0 : Math.random()},
+ ${testMode ? 0 : Math.random()});
const float SHOWER_TIME = 0.3;
const float SHOWER_WIDTH = 0.3;
const float STREAK_TIME = 0.6;
diff --git a/src/TRexAttack.js b/src/TRexAttack.js
index a5f167a..19a971e 100644
--- a/src/TRexAttack.js
+++ b/src/TRexAttack.js
@@ -132,6 +132,9 @@ if (utils.isInShellProcess()) {
const color =
Clutter.Color.from_string(settings.get_string('claw-scratch-color'))[1];
+ // If we are currently performing integration test, the animation uses a fixed seed.
+ const testMode = settings.get_boolean('test-mode');
+
this.set_shader_source(`
// Inject some common shader snippets.
@@ -141,7 +144,8 @@ if (utils.isInShellProcess()) {
// See assets/README.md for how this texture was created.
uniform sampler2D uClawTexture;
- const vec2 SEED = vec2(${Math.random()}, ${Math.random()});
+ const vec2 SEED = vec2(${testMode ? 0 : Math.random()},
+ ${testMode ? 0 : Math.random()});
const float CLAW_SIZE = ${settings.get_double('claw-scratch-scale')};
const float NUM_CLAWS = ${settings.get_int('claw-scratch-count')};
const float WARP_INTENSITY = 1.0 + ${settings.get_double('claw-scratch-warp')};
diff --git a/src/Wisps.js b/src/Wisps.js
index 42b17d5..ccbc608 100644
--- a/src/Wisps.js
+++ b/src/Wisps.js
@@ -118,6 +118,9 @@ if (utils.isInShellProcess()) {
const color = Clutter.Color.from_string(settings.get_string('wisps-color'))[1];
+ // If we are currently performing integration test, the animation uses a fixed seed.
+ const testMode = settings.get_boolean('test-mode');
+
this.set_shader_source(`
// Inject some common shader snippets.
@@ -125,7 +128,8 @@ if (utils.isInShellProcess()) {
${shaderSnippets.noise()}
${shaderSnippets.edgeMask()}
- const vec2 SEED = vec2(${Math.random()}, ${Math.random()});
+ const vec2 SEED = vec2(${testMode ? 0 : Math.random()},
+ ${testMode ? 0 : Math.random()});
const float WISPS_RADIUS = 20.0;
const float WISPS_SPEED = 10.0;
const float WISPS_SPACING = 40 + WISPS_RADIUS;
diff --git a/tests/generate-references.sh b/tests/generate-references.sh
new file mode 100755
index 0000000..a067833
--- /dev/null
+++ b/tests/generate-references.sh
@@ -0,0 +1,183 @@
+#!/bin/bash
+
+# -------------------------------------------------------------------------------------- #
+# ) ( #
+# ( /( ( ( ) ( ( ( ( )\ ) ( ( #
+# )\()) ))\ )( ( ( )\ ) )\))( )\ ( (()/( ( )\))( ( #
+# ((_)\ /((_|()\ )\ ) )\ '(()/( ((_)()((_) )\ ) ((_)))\((_)()\ )\ #
+# | |(_|_))( ((_)_(_/( _((_)) )(_)) _(()((_|_)_(_/( _| |((_)(()((_|(_) #
+# | '_ \ || | '_| ' \)) | ' \()| || | \ V V / | ' \)) _` / _ \ V V (_-< #
+# |_.__/\_,_|_| |_||_| |_|_|_| \_, | \_/\_/|_|_||_|\__,_\___/\_/\_//__/ #
+# |__/ #
+# Copyright (c) 2021 Simon Schneegans #
+# Released under the GPLv3 or later. See LICENSE file for details. #
+# -------------------------------------------------------------------------------------- #
+
+# This script is used to generate the reference images required for the run-tests.sh
+# script. To do this, it installs the extension in a fedora-based container running GNOME
+# Shell on xvfb. It requires the burn-my-windows@schneegans.github.com.zip file which is
+# expected to be present in the repository root. Therefore you have to call "make" before
+# this script.
+#
+# The scripts supports two arguments:
+#
+# -v fedora_version: This determines the version of GNOME Shell to test agains.
+# -v 32: GNOME Shell 3.36
+# -v 33: GNOME Shell 3.38
+# -v 34: GNOME Shell 40
+# -v 35: GNOME Shell 41
+# -s session: This can either be "gnome-xsession" or "gnome-wayland-nested".
+
+# Exit on error.
+set -e
+
+usage() {
+ echo "Usage: $0 -v fedora_version -s session" >&2
+}
+
+FEDORA_VERSION=33
+SESSION="gnome-xsession"
+
+while getopts "v:s:h" opt; do
+ case $opt in
+ v) FEDORA_VERSION="${OPTARG}";;
+ s) SESSION="${OPTARG}";;
+ h) usage; exit 0;;
+ *) usage; exit 1;;
+ esac
+done
+
+# Go to the repo root.
+cd "$( cd "$( dirname "$0" )" && pwd )/.." || \
+ { echo "ERROR: Could not find the repo root."; exit 1; }
+
+IMAGE="ghcr.io/schneegans/gnome-shell-pod-${FEDORA_VERSION}"
+EXTENSION="burn-my-windows@schneegans.github.com"
+
+# All references images of the effects are captured at & cropped to this region
+# in the center of the screen. This is kind of arbitrary, but has been choosen so that
+# something is visible from each effect.
+CROP="100x100+910+480"
+
+# Run the container. For more info, visit https://github.com/Schneegans/gnome-shell-pod.
+POD=$(podman run --rm --cap-add=SYS_NICE --cap-add=IPC_LOCK -td "${IMAGE}")
+
+# Properly shutdown podman when this script is exited.
+quit() {
+ podman kill "${POD}"
+ wait
+}
+
+trap quit INT TERM EXIT
+
+# -------------------------------------------------------------------------------- methods
+
+# This function is used below to execute any shell command inside the running container.
+do_in_pod() {
+ podman exec --user gnomeshell --workdir /home/gnomeshell "${POD}" set-env.sh "$@"
+}
+
+# This simulates the given keystroke in the container. Simply calling "xdotool key $1"
+# sometimes fails to be recognized. Maybe the default 12ms between key-down and key-up
+# are too short for xvfb...
+send_keystroke() {
+ do_in_pod xdotool keydown "${1}"
+ sleep 0.5
+ do_in_pod xdotool keyup "${1}"
+}
+
+# This can be used to set a gsettings key of the extension.
+set_setting() {
+ do_in_pod gsettings --schemadir /home/gnomeshell/.local/share/gnome-shell/extensions/burn-my-windows@schneegans.github.com/schemas \
+ set org.gnome.shell.extensions.burn-my-windows "${1}" "${2}"
+}
+
+# This makes a screen capture (cropped to $CROP) inside the container and stores it
+# on the host relative to this script with the given file name.
+capture() {
+ do_in_pod import -window root -crop $CROP out.png
+ podman cp "${POD}":/home/gnomeshell/out.png "${1}"
+}
+
+# This opens the extensions preferences dialog and captures two images: One during the
+# window-open animation, and one during the window-close animation. The sleeps are a bit
+# excessive, but it's difficult to get consistent results with shorter sleeps. The
+# animations are shown for five seconds, so we also have to make sure that one animation
+# is finished before starting the next one.
+capture_effect() {
+ echo "Capturing ${1} effect."
+
+ set_setting "open-preview-effect" "${1}"
+ set_setting "close-preview-effect" "${1}"
+
+ sleep 2
+ do_in_pod gnome-extensions prefs "${EXTENSION}"
+ sleep 2
+ capture "tests/references/${1}-open-${SESSION}-${FEDORA_VERSION}.png"
+ send_keystroke "Alt+F4"
+ sleep 2
+ capture "tests/references/${1}-close-${SESSION}-${FEDORA_VERSION}.png"
+ sleep 2
+}
+
+# ----------------------------------------------------- wait for the container to start up
+
+echo "Waiting for D-Bus."
+do_in_pod wait-user-bus.sh > /dev/null 2>&1
+
+
+# ----------------------------------------------------- install the to-be-tested extension
+
+echo "Installing extension."
+podman cp "tests/references" "${POD}:/home/gnomeshell/references"
+podman cp "${EXTENSION}.zip" "${POD}:/home/gnomeshell"
+do_in_pod gnome-extensions install "${EXTENSION}.zip"
+
+
+# ---------------------------------------------------------------------- start GNOME Shell
+
+# Starting with GNOME 40, there is a "Welcome Tour" dialog popping up at first launch.
+# We disable this beforehand.
+if [[ "${FEDORA_VERSION}" -gt 33 ]]; then
+ echo "Disabling welcome tour."
+ do_in_pod gsettings set org.gnome.shell welcome-dialog-last-shown-version "999" || true
+fi
+
+echo "Starting $(do_in_pod gnome-shell --version)."
+do_in_pod systemctl --user start "${SESSION}@:99"
+sleep 10
+
+# Enable the extension.
+do_in_pod gnome-extensions enable "${EXTENSION}"
+
+# Starting with GNOME 40, the overview is the default mode. We close this here by hitting
+# the super key.
+if [[ "${FEDORA_VERSION}" -gt 33 ]]; then
+ echo "Closing Overview."
+ send_keystroke "super"
+fi
+
+# Wait until the extension is enabled and the overview closed.
+sleep 3
+
+
+# --------------------------------------------------------------------- capture the images
+
+# The test mode ensures that the animations are "frozen" and do not change in time.
+echo "Entering test mode."
+set_setting "test-mode" true
+do_in_pod gsettings set org.gnome.mutter center-new-windows true
+
+capture_effect "energize-a"
+capture_effect "energize-b"
+capture_effect "fire"
+capture_effect "tv"
+capture_effect "wisps"
+
+if [[ "${FEDORA_VERSION}" -gt 33 ]]; then
+ capture_effect "trex"
+ capture_effect "broken-glass"
+ capture_effect "matrix"
+fi
+
+echo "All reference images generated successfully."
diff --git a/tests/references/broken-glass-close-gnome-wayland-nested-34.png b/tests/references/broken-glass-close-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..0411c8e
Binary files /dev/null and b/tests/references/broken-glass-close-gnome-wayland-nested-34.png differ
diff --git a/tests/references/broken-glass-close-gnome-wayland-nested-35.png b/tests/references/broken-glass-close-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..1f1989f
Binary files /dev/null and b/tests/references/broken-glass-close-gnome-wayland-nested-35.png differ
diff --git a/tests/references/broken-glass-close-gnome-wayland-nested-36.png b/tests/references/broken-glass-close-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..543aed5
Binary files /dev/null and b/tests/references/broken-glass-close-gnome-wayland-nested-36.png differ
diff --git a/tests/references/broken-glass-close-gnome-xsession-34.png b/tests/references/broken-glass-close-gnome-xsession-34.png
new file mode 100644
index 0000000..85fc38f
Binary files /dev/null and b/tests/references/broken-glass-close-gnome-xsession-34.png differ
diff --git a/tests/references/broken-glass-close-gnome-xsession-35.png b/tests/references/broken-glass-close-gnome-xsession-35.png
new file mode 100644
index 0000000..27373eb
Binary files /dev/null and b/tests/references/broken-glass-close-gnome-xsession-35.png differ
diff --git a/tests/references/broken-glass-close-gnome-xsession-36.png b/tests/references/broken-glass-close-gnome-xsession-36.png
new file mode 100644
index 0000000..180b488
Binary files /dev/null and b/tests/references/broken-glass-close-gnome-xsession-36.png differ
diff --git a/tests/references/broken-glass-open-gnome-wayland-nested-34.png b/tests/references/broken-glass-open-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..f695659
Binary files /dev/null and b/tests/references/broken-glass-open-gnome-wayland-nested-34.png differ
diff --git a/tests/references/broken-glass-open-gnome-wayland-nested-35.png b/tests/references/broken-glass-open-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..071f22f
Binary files /dev/null and b/tests/references/broken-glass-open-gnome-wayland-nested-35.png differ
diff --git a/tests/references/broken-glass-open-gnome-wayland-nested-36.png b/tests/references/broken-glass-open-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..3622103
Binary files /dev/null and b/tests/references/broken-glass-open-gnome-wayland-nested-36.png differ
diff --git a/tests/references/broken-glass-open-gnome-xsession-34.png b/tests/references/broken-glass-open-gnome-xsession-34.png
new file mode 100644
index 0000000..64bbf3a
Binary files /dev/null and b/tests/references/broken-glass-open-gnome-xsession-34.png differ
diff --git a/tests/references/broken-glass-open-gnome-xsession-35.png b/tests/references/broken-glass-open-gnome-xsession-35.png
new file mode 100644
index 0000000..63df622
Binary files /dev/null and b/tests/references/broken-glass-open-gnome-xsession-35.png differ
diff --git a/tests/references/broken-glass-open-gnome-xsession-36.png b/tests/references/broken-glass-open-gnome-xsession-36.png
new file mode 100644
index 0000000..76bb6b0
Binary files /dev/null and b/tests/references/broken-glass-open-gnome-xsession-36.png differ
diff --git a/tests/references/energize-a-close-gnome-wayland-nested-32.png b/tests/references/energize-a-close-gnome-wayland-nested-32.png
new file mode 100644
index 0000000..f6b5dcc
Binary files /dev/null and b/tests/references/energize-a-close-gnome-wayland-nested-32.png differ
diff --git a/tests/references/energize-a-close-gnome-wayland-nested-33.png b/tests/references/energize-a-close-gnome-wayland-nested-33.png
new file mode 100644
index 0000000..97e5ce2
Binary files /dev/null and b/tests/references/energize-a-close-gnome-wayland-nested-33.png differ
diff --git a/tests/references/energize-a-close-gnome-wayland-nested-34.png b/tests/references/energize-a-close-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..653dd03
Binary files /dev/null and b/tests/references/energize-a-close-gnome-wayland-nested-34.png differ
diff --git a/tests/references/energize-a-close-gnome-wayland-nested-35.png b/tests/references/energize-a-close-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..653dd03
Binary files /dev/null and b/tests/references/energize-a-close-gnome-wayland-nested-35.png differ
diff --git a/tests/references/energize-a-close-gnome-wayland-nested-36.png b/tests/references/energize-a-close-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..1c682c0
Binary files /dev/null and b/tests/references/energize-a-close-gnome-wayland-nested-36.png differ
diff --git a/tests/references/energize-a-close-gnome-xsession-32.png b/tests/references/energize-a-close-gnome-xsession-32.png
new file mode 100644
index 0000000..f6b5dcc
Binary files /dev/null and b/tests/references/energize-a-close-gnome-xsession-32.png differ
diff --git a/tests/references/energize-a-close-gnome-xsession-33.png b/tests/references/energize-a-close-gnome-xsession-33.png
new file mode 100644
index 0000000..97e5ce2
Binary files /dev/null and b/tests/references/energize-a-close-gnome-xsession-33.png differ
diff --git a/tests/references/energize-a-close-gnome-xsession-34.png b/tests/references/energize-a-close-gnome-xsession-34.png
new file mode 100644
index 0000000..0f41509
Binary files /dev/null and b/tests/references/energize-a-close-gnome-xsession-34.png differ
diff --git a/tests/references/energize-a-close-gnome-xsession-35.png b/tests/references/energize-a-close-gnome-xsession-35.png
new file mode 100644
index 0000000..0f41509
Binary files /dev/null and b/tests/references/energize-a-close-gnome-xsession-35.png differ
diff --git a/tests/references/energize-a-close-gnome-xsession-36.png b/tests/references/energize-a-close-gnome-xsession-36.png
new file mode 100644
index 0000000..5ac8576
Binary files /dev/null and b/tests/references/energize-a-close-gnome-xsession-36.png differ
diff --git a/tests/references/energize-a-open-gnome-wayland-nested-32.png b/tests/references/energize-a-open-gnome-wayland-nested-32.png
new file mode 100644
index 0000000..fcefdfc
Binary files /dev/null and b/tests/references/energize-a-open-gnome-wayland-nested-32.png differ
diff --git a/tests/references/energize-a-open-gnome-wayland-nested-33.png b/tests/references/energize-a-open-gnome-wayland-nested-33.png
new file mode 100644
index 0000000..3969643
Binary files /dev/null and b/tests/references/energize-a-open-gnome-wayland-nested-33.png differ
diff --git a/tests/references/energize-a-open-gnome-wayland-nested-34.png b/tests/references/energize-a-open-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..102c6b7
Binary files /dev/null and b/tests/references/energize-a-open-gnome-wayland-nested-34.png differ
diff --git a/tests/references/energize-a-open-gnome-wayland-nested-35.png b/tests/references/energize-a-open-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..102c6b7
Binary files /dev/null and b/tests/references/energize-a-open-gnome-wayland-nested-35.png differ
diff --git a/tests/references/energize-a-open-gnome-wayland-nested-36.png b/tests/references/energize-a-open-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..6dd8e2e
Binary files /dev/null and b/tests/references/energize-a-open-gnome-wayland-nested-36.png differ
diff --git a/tests/references/energize-a-open-gnome-xsession-32.png b/tests/references/energize-a-open-gnome-xsession-32.png
new file mode 100644
index 0000000..fcefdfc
Binary files /dev/null and b/tests/references/energize-a-open-gnome-xsession-32.png differ
diff --git a/tests/references/energize-a-open-gnome-xsession-33.png b/tests/references/energize-a-open-gnome-xsession-33.png
new file mode 100644
index 0000000..3969643
Binary files /dev/null and b/tests/references/energize-a-open-gnome-xsession-33.png differ
diff --git a/tests/references/energize-a-open-gnome-xsession-34.png b/tests/references/energize-a-open-gnome-xsession-34.png
new file mode 100644
index 0000000..69677e8
Binary files /dev/null and b/tests/references/energize-a-open-gnome-xsession-34.png differ
diff --git a/tests/references/energize-a-open-gnome-xsession-35.png b/tests/references/energize-a-open-gnome-xsession-35.png
new file mode 100644
index 0000000..69677e8
Binary files /dev/null and b/tests/references/energize-a-open-gnome-xsession-35.png differ
diff --git a/tests/references/energize-a-open-gnome-xsession-36.png b/tests/references/energize-a-open-gnome-xsession-36.png
new file mode 100644
index 0000000..88ee669
Binary files /dev/null and b/tests/references/energize-a-open-gnome-xsession-36.png differ
diff --git a/tests/references/energize-b-close-gnome-wayland-nested-32.png b/tests/references/energize-b-close-gnome-wayland-nested-32.png
new file mode 100644
index 0000000..8419318
Binary files /dev/null and b/tests/references/energize-b-close-gnome-wayland-nested-32.png differ
diff --git a/tests/references/energize-b-close-gnome-wayland-nested-33.png b/tests/references/energize-b-close-gnome-wayland-nested-33.png
new file mode 100644
index 0000000..6725b9e
Binary files /dev/null and b/tests/references/energize-b-close-gnome-wayland-nested-33.png differ
diff --git a/tests/references/energize-b-close-gnome-wayland-nested-34.png b/tests/references/energize-b-close-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..7e8ce24
Binary files /dev/null and b/tests/references/energize-b-close-gnome-wayland-nested-34.png differ
diff --git a/tests/references/energize-b-close-gnome-wayland-nested-35.png b/tests/references/energize-b-close-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..7e8ce24
Binary files /dev/null and b/tests/references/energize-b-close-gnome-wayland-nested-35.png differ
diff --git a/tests/references/energize-b-close-gnome-wayland-nested-36.png b/tests/references/energize-b-close-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..a0f1ece
Binary files /dev/null and b/tests/references/energize-b-close-gnome-wayland-nested-36.png differ
diff --git a/tests/references/energize-b-close-gnome-xsession-32.png b/tests/references/energize-b-close-gnome-xsession-32.png
new file mode 100644
index 0000000..8419318
Binary files /dev/null and b/tests/references/energize-b-close-gnome-xsession-32.png differ
diff --git a/tests/references/energize-b-close-gnome-xsession-33.png b/tests/references/energize-b-close-gnome-xsession-33.png
new file mode 100644
index 0000000..6725b9e
Binary files /dev/null and b/tests/references/energize-b-close-gnome-xsession-33.png differ
diff --git a/tests/references/energize-b-close-gnome-xsession-34.png b/tests/references/energize-b-close-gnome-xsession-34.png
new file mode 100644
index 0000000..5c629cf
Binary files /dev/null and b/tests/references/energize-b-close-gnome-xsession-34.png differ
diff --git a/tests/references/energize-b-close-gnome-xsession-35.png b/tests/references/energize-b-close-gnome-xsession-35.png
new file mode 100644
index 0000000..5c629cf
Binary files /dev/null and b/tests/references/energize-b-close-gnome-xsession-35.png differ
diff --git a/tests/references/energize-b-close-gnome-xsession-36.png b/tests/references/energize-b-close-gnome-xsession-36.png
new file mode 100644
index 0000000..728d3d4
Binary files /dev/null and b/tests/references/energize-b-close-gnome-xsession-36.png differ
diff --git a/tests/references/energize-b-open-gnome-wayland-nested-32.png b/tests/references/energize-b-open-gnome-wayland-nested-32.png
new file mode 100644
index 0000000..7c1297b
Binary files /dev/null and b/tests/references/energize-b-open-gnome-wayland-nested-32.png differ
diff --git a/tests/references/energize-b-open-gnome-wayland-nested-33.png b/tests/references/energize-b-open-gnome-wayland-nested-33.png
new file mode 100644
index 0000000..8c56a56
Binary files /dev/null and b/tests/references/energize-b-open-gnome-wayland-nested-33.png differ
diff --git a/tests/references/energize-b-open-gnome-wayland-nested-34.png b/tests/references/energize-b-open-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..0046ebe
Binary files /dev/null and b/tests/references/energize-b-open-gnome-wayland-nested-34.png differ
diff --git a/tests/references/energize-b-open-gnome-wayland-nested-35.png b/tests/references/energize-b-open-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..0046ebe
Binary files /dev/null and b/tests/references/energize-b-open-gnome-wayland-nested-35.png differ
diff --git a/tests/references/energize-b-open-gnome-wayland-nested-36.png b/tests/references/energize-b-open-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..eb10914
Binary files /dev/null and b/tests/references/energize-b-open-gnome-wayland-nested-36.png differ
diff --git a/tests/references/energize-b-open-gnome-xsession-32.png b/tests/references/energize-b-open-gnome-xsession-32.png
new file mode 100644
index 0000000..7c1297b
Binary files /dev/null and b/tests/references/energize-b-open-gnome-xsession-32.png differ
diff --git a/tests/references/energize-b-open-gnome-xsession-33.png b/tests/references/energize-b-open-gnome-xsession-33.png
new file mode 100644
index 0000000..8c56a56
Binary files /dev/null and b/tests/references/energize-b-open-gnome-xsession-33.png differ
diff --git a/tests/references/energize-b-open-gnome-xsession-34.png b/tests/references/energize-b-open-gnome-xsession-34.png
new file mode 100644
index 0000000..2245ffe
Binary files /dev/null and b/tests/references/energize-b-open-gnome-xsession-34.png differ
diff --git a/tests/references/energize-b-open-gnome-xsession-35.png b/tests/references/energize-b-open-gnome-xsession-35.png
new file mode 100644
index 0000000..2245ffe
Binary files /dev/null and b/tests/references/energize-b-open-gnome-xsession-35.png differ
diff --git a/tests/references/energize-b-open-gnome-xsession-36.png b/tests/references/energize-b-open-gnome-xsession-36.png
new file mode 100644
index 0000000..51cc8b6
Binary files /dev/null and b/tests/references/energize-b-open-gnome-xsession-36.png differ
diff --git a/tests/references/fire-close-gnome-wayland-nested-32.png b/tests/references/fire-close-gnome-wayland-nested-32.png
new file mode 100644
index 0000000..08e36b8
Binary files /dev/null and b/tests/references/fire-close-gnome-wayland-nested-32.png differ
diff --git a/tests/references/fire-close-gnome-wayland-nested-33.png b/tests/references/fire-close-gnome-wayland-nested-33.png
new file mode 100644
index 0000000..8398e90
Binary files /dev/null and b/tests/references/fire-close-gnome-wayland-nested-33.png differ
diff --git a/tests/references/fire-close-gnome-wayland-nested-34.png b/tests/references/fire-close-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..17f8f4c
Binary files /dev/null and b/tests/references/fire-close-gnome-wayland-nested-34.png differ
diff --git a/tests/references/fire-close-gnome-wayland-nested-35.png b/tests/references/fire-close-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..17f8f4c
Binary files /dev/null and b/tests/references/fire-close-gnome-wayland-nested-35.png differ
diff --git a/tests/references/fire-close-gnome-wayland-nested-36.png b/tests/references/fire-close-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..59dde9a
Binary files /dev/null and b/tests/references/fire-close-gnome-wayland-nested-36.png differ
diff --git a/tests/references/fire-close-gnome-xsession-32.png b/tests/references/fire-close-gnome-xsession-32.png
new file mode 100644
index 0000000..08e36b8
Binary files /dev/null and b/tests/references/fire-close-gnome-xsession-32.png differ
diff --git a/tests/references/fire-close-gnome-xsession-33.png b/tests/references/fire-close-gnome-xsession-33.png
new file mode 100644
index 0000000..8398e90
Binary files /dev/null and b/tests/references/fire-close-gnome-xsession-33.png differ
diff --git a/tests/references/fire-close-gnome-xsession-34.png b/tests/references/fire-close-gnome-xsession-34.png
new file mode 100644
index 0000000..38ac0c5
Binary files /dev/null and b/tests/references/fire-close-gnome-xsession-34.png differ
diff --git a/tests/references/fire-close-gnome-xsession-35.png b/tests/references/fire-close-gnome-xsession-35.png
new file mode 100644
index 0000000..38ac0c5
Binary files /dev/null and b/tests/references/fire-close-gnome-xsession-35.png differ
diff --git a/tests/references/fire-close-gnome-xsession-36.png b/tests/references/fire-close-gnome-xsession-36.png
new file mode 100644
index 0000000..8b9fca9
Binary files /dev/null and b/tests/references/fire-close-gnome-xsession-36.png differ
diff --git a/tests/references/fire-open-gnome-wayland-nested-32.png b/tests/references/fire-open-gnome-wayland-nested-32.png
new file mode 100644
index 0000000..3e76277
Binary files /dev/null and b/tests/references/fire-open-gnome-wayland-nested-32.png differ
diff --git a/tests/references/fire-open-gnome-wayland-nested-33.png b/tests/references/fire-open-gnome-wayland-nested-33.png
new file mode 100644
index 0000000..668fa28
Binary files /dev/null and b/tests/references/fire-open-gnome-wayland-nested-33.png differ
diff --git a/tests/references/fire-open-gnome-wayland-nested-34.png b/tests/references/fire-open-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..a258046
Binary files /dev/null and b/tests/references/fire-open-gnome-wayland-nested-34.png differ
diff --git a/tests/references/fire-open-gnome-wayland-nested-35.png b/tests/references/fire-open-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..a258046
Binary files /dev/null and b/tests/references/fire-open-gnome-wayland-nested-35.png differ
diff --git a/tests/references/fire-open-gnome-wayland-nested-36.png b/tests/references/fire-open-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..456f20b
Binary files /dev/null and b/tests/references/fire-open-gnome-wayland-nested-36.png differ
diff --git a/tests/references/fire-open-gnome-xsession-32.png b/tests/references/fire-open-gnome-xsession-32.png
new file mode 100644
index 0000000..3e76277
Binary files /dev/null and b/tests/references/fire-open-gnome-xsession-32.png differ
diff --git a/tests/references/fire-open-gnome-xsession-33.png b/tests/references/fire-open-gnome-xsession-33.png
new file mode 100644
index 0000000..668fa28
Binary files /dev/null and b/tests/references/fire-open-gnome-xsession-33.png differ
diff --git a/tests/references/fire-open-gnome-xsession-34.png b/tests/references/fire-open-gnome-xsession-34.png
new file mode 100644
index 0000000..b257176
Binary files /dev/null and b/tests/references/fire-open-gnome-xsession-34.png differ
diff --git a/tests/references/fire-open-gnome-xsession-35.png b/tests/references/fire-open-gnome-xsession-35.png
new file mode 100644
index 0000000..b257176
Binary files /dev/null and b/tests/references/fire-open-gnome-xsession-35.png differ
diff --git a/tests/references/fire-open-gnome-xsession-36.png b/tests/references/fire-open-gnome-xsession-36.png
new file mode 100644
index 0000000..ade8bfa
Binary files /dev/null and b/tests/references/fire-open-gnome-xsession-36.png differ
diff --git a/tests/references/matrix-close-gnome-wayland-nested-34.png b/tests/references/matrix-close-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..a1b5672
Binary files /dev/null and b/tests/references/matrix-close-gnome-wayland-nested-34.png differ
diff --git a/tests/references/matrix-close-gnome-wayland-nested-35.png b/tests/references/matrix-close-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..85abebf
Binary files /dev/null and b/tests/references/matrix-close-gnome-wayland-nested-35.png differ
diff --git a/tests/references/matrix-close-gnome-wayland-nested-36.png b/tests/references/matrix-close-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..6c7392a
Binary files /dev/null and b/tests/references/matrix-close-gnome-wayland-nested-36.png differ
diff --git a/tests/references/matrix-close-gnome-xsession-34.png b/tests/references/matrix-close-gnome-xsession-34.png
new file mode 100644
index 0000000..9ae6901
Binary files /dev/null and b/tests/references/matrix-close-gnome-xsession-34.png differ
diff --git a/tests/references/matrix-close-gnome-xsession-35.png b/tests/references/matrix-close-gnome-xsession-35.png
new file mode 100644
index 0000000..74ba79e
Binary files /dev/null and b/tests/references/matrix-close-gnome-xsession-35.png differ
diff --git a/tests/references/matrix-close-gnome-xsession-36.png b/tests/references/matrix-close-gnome-xsession-36.png
new file mode 100644
index 0000000..02dbabf
Binary files /dev/null and b/tests/references/matrix-close-gnome-xsession-36.png differ
diff --git a/tests/references/matrix-open-gnome-wayland-nested-34.png b/tests/references/matrix-open-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..14df9ca
Binary files /dev/null and b/tests/references/matrix-open-gnome-wayland-nested-34.png differ
diff --git a/tests/references/matrix-open-gnome-wayland-nested-35.png b/tests/references/matrix-open-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..201b487
Binary files /dev/null and b/tests/references/matrix-open-gnome-wayland-nested-35.png differ
diff --git a/tests/references/matrix-open-gnome-wayland-nested-36.png b/tests/references/matrix-open-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..58c8581
Binary files /dev/null and b/tests/references/matrix-open-gnome-wayland-nested-36.png differ
diff --git a/tests/references/matrix-open-gnome-xsession-34.png b/tests/references/matrix-open-gnome-xsession-34.png
new file mode 100644
index 0000000..750f732
Binary files /dev/null and b/tests/references/matrix-open-gnome-xsession-34.png differ
diff --git a/tests/references/matrix-open-gnome-xsession-35.png b/tests/references/matrix-open-gnome-xsession-35.png
new file mode 100644
index 0000000..eb932e2
Binary files /dev/null and b/tests/references/matrix-open-gnome-xsession-35.png differ
diff --git a/tests/references/matrix-open-gnome-xsession-36.png b/tests/references/matrix-open-gnome-xsession-36.png
new file mode 100644
index 0000000..523a068
Binary files /dev/null and b/tests/references/matrix-open-gnome-xsession-36.png differ
diff --git a/tests/references/preferences.png b/tests/references/preferences.png
deleted file mode 100644
index b57a4bf..0000000
Binary files a/tests/references/preferences.png and /dev/null differ
diff --git a/tests/references/trex-close-gnome-wayland-nested-34.png b/tests/references/trex-close-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..4beed8b
Binary files /dev/null and b/tests/references/trex-close-gnome-wayland-nested-34.png differ
diff --git a/tests/references/trex-close-gnome-wayland-nested-35.png b/tests/references/trex-close-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..e8549c1
Binary files /dev/null and b/tests/references/trex-close-gnome-wayland-nested-35.png differ
diff --git a/tests/references/trex-close-gnome-wayland-nested-36.png b/tests/references/trex-close-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..6af9081
Binary files /dev/null and b/tests/references/trex-close-gnome-wayland-nested-36.png differ
diff --git a/tests/references/trex-close-gnome-xsession-34.png b/tests/references/trex-close-gnome-xsession-34.png
new file mode 100644
index 0000000..fc8b2a2
Binary files /dev/null and b/tests/references/trex-close-gnome-xsession-34.png differ
diff --git a/tests/references/trex-close-gnome-xsession-35.png b/tests/references/trex-close-gnome-xsession-35.png
new file mode 100644
index 0000000..2a0f280
Binary files /dev/null and b/tests/references/trex-close-gnome-xsession-35.png differ
diff --git a/tests/references/trex-close-gnome-xsession-36.png b/tests/references/trex-close-gnome-xsession-36.png
new file mode 100644
index 0000000..52a6621
Binary files /dev/null and b/tests/references/trex-close-gnome-xsession-36.png differ
diff --git a/tests/references/trex-open-gnome-wayland-nested-34.png b/tests/references/trex-open-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..4beed8b
Binary files /dev/null and b/tests/references/trex-open-gnome-wayland-nested-34.png differ
diff --git a/tests/references/trex-open-gnome-wayland-nested-35.png b/tests/references/trex-open-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..e8549c1
Binary files /dev/null and b/tests/references/trex-open-gnome-wayland-nested-35.png differ
diff --git a/tests/references/trex-open-gnome-wayland-nested-36.png b/tests/references/trex-open-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..6af9081
Binary files /dev/null and b/tests/references/trex-open-gnome-wayland-nested-36.png differ
diff --git a/tests/references/trex-open-gnome-xsession-34.png b/tests/references/trex-open-gnome-xsession-34.png
new file mode 100644
index 0000000..fc8b2a2
Binary files /dev/null and b/tests/references/trex-open-gnome-xsession-34.png differ
diff --git a/tests/references/trex-open-gnome-xsession-35.png b/tests/references/trex-open-gnome-xsession-35.png
new file mode 100644
index 0000000..2a0f280
Binary files /dev/null and b/tests/references/trex-open-gnome-xsession-35.png differ
diff --git a/tests/references/trex-open-gnome-xsession-36.png b/tests/references/trex-open-gnome-xsession-36.png
new file mode 100644
index 0000000..52a6621
Binary files /dev/null and b/tests/references/trex-open-gnome-xsession-36.png differ
diff --git a/tests/references/tv-close-gnome-wayland-nested-32.png b/tests/references/tv-close-gnome-wayland-nested-32.png
new file mode 100644
index 0000000..affa8bb
Binary files /dev/null and b/tests/references/tv-close-gnome-wayland-nested-32.png differ
diff --git a/tests/references/tv-close-gnome-wayland-nested-33.png b/tests/references/tv-close-gnome-wayland-nested-33.png
new file mode 100644
index 0000000..86b3bba
Binary files /dev/null and b/tests/references/tv-close-gnome-wayland-nested-33.png differ
diff --git a/tests/references/tv-close-gnome-wayland-nested-34.png b/tests/references/tv-close-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..dbba5c5
Binary files /dev/null and b/tests/references/tv-close-gnome-wayland-nested-34.png differ
diff --git a/tests/references/tv-close-gnome-wayland-nested-35.png b/tests/references/tv-close-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..dbba5c5
Binary files /dev/null and b/tests/references/tv-close-gnome-wayland-nested-35.png differ
diff --git a/tests/references/tv-close-gnome-wayland-nested-36.png b/tests/references/tv-close-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..11334dc
Binary files /dev/null and b/tests/references/tv-close-gnome-wayland-nested-36.png differ
diff --git a/tests/references/tv-close-gnome-xsession-32.png b/tests/references/tv-close-gnome-xsession-32.png
new file mode 100644
index 0000000..affa8bb
Binary files /dev/null and b/tests/references/tv-close-gnome-xsession-32.png differ
diff --git a/tests/references/tv-close-gnome-xsession-33.png b/tests/references/tv-close-gnome-xsession-33.png
new file mode 100644
index 0000000..86b3bba
Binary files /dev/null and b/tests/references/tv-close-gnome-xsession-33.png differ
diff --git a/tests/references/tv-close-gnome-xsession-34.png b/tests/references/tv-close-gnome-xsession-34.png
new file mode 100644
index 0000000..146c0c7
Binary files /dev/null and b/tests/references/tv-close-gnome-xsession-34.png differ
diff --git a/tests/references/tv-close-gnome-xsession-35.png b/tests/references/tv-close-gnome-xsession-35.png
new file mode 100644
index 0000000..146c0c7
Binary files /dev/null and b/tests/references/tv-close-gnome-xsession-35.png differ
diff --git a/tests/references/tv-close-gnome-xsession-36.png b/tests/references/tv-close-gnome-xsession-36.png
new file mode 100644
index 0000000..a9daef2
Binary files /dev/null and b/tests/references/tv-close-gnome-xsession-36.png differ
diff --git a/tests/references/tv-open-gnome-wayland-nested-32.png b/tests/references/tv-open-gnome-wayland-nested-32.png
new file mode 100644
index 0000000..affa8bb
Binary files /dev/null and b/tests/references/tv-open-gnome-wayland-nested-32.png differ
diff --git a/tests/references/tv-open-gnome-wayland-nested-33.png b/tests/references/tv-open-gnome-wayland-nested-33.png
new file mode 100644
index 0000000..86b3bba
Binary files /dev/null and b/tests/references/tv-open-gnome-wayland-nested-33.png differ
diff --git a/tests/references/tv-open-gnome-wayland-nested-34.png b/tests/references/tv-open-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..dbba5c5
Binary files /dev/null and b/tests/references/tv-open-gnome-wayland-nested-34.png differ
diff --git a/tests/references/tv-open-gnome-wayland-nested-35.png b/tests/references/tv-open-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..dbba5c5
Binary files /dev/null and b/tests/references/tv-open-gnome-wayland-nested-35.png differ
diff --git a/tests/references/tv-open-gnome-wayland-nested-36.png b/tests/references/tv-open-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..11334dc
Binary files /dev/null and b/tests/references/tv-open-gnome-wayland-nested-36.png differ
diff --git a/tests/references/tv-open-gnome-xsession-32.png b/tests/references/tv-open-gnome-xsession-32.png
new file mode 100644
index 0000000..affa8bb
Binary files /dev/null and b/tests/references/tv-open-gnome-xsession-32.png differ
diff --git a/tests/references/tv-open-gnome-xsession-33.png b/tests/references/tv-open-gnome-xsession-33.png
new file mode 100644
index 0000000..86b3bba
Binary files /dev/null and b/tests/references/tv-open-gnome-xsession-33.png differ
diff --git a/tests/references/tv-open-gnome-xsession-34.png b/tests/references/tv-open-gnome-xsession-34.png
new file mode 100644
index 0000000..146c0c7
Binary files /dev/null and b/tests/references/tv-open-gnome-xsession-34.png differ
diff --git a/tests/references/tv-open-gnome-xsession-35.png b/tests/references/tv-open-gnome-xsession-35.png
new file mode 100644
index 0000000..146c0c7
Binary files /dev/null and b/tests/references/tv-open-gnome-xsession-35.png differ
diff --git a/tests/references/tv-open-gnome-xsession-36.png b/tests/references/tv-open-gnome-xsession-36.png
new file mode 100644
index 0000000..a9daef2
Binary files /dev/null and b/tests/references/tv-open-gnome-xsession-36.png differ
diff --git a/tests/references/wisps-close-gnome-wayland-nested-32.png b/tests/references/wisps-close-gnome-wayland-nested-32.png
new file mode 100644
index 0000000..5f8f9a3
Binary files /dev/null and b/tests/references/wisps-close-gnome-wayland-nested-32.png differ
diff --git a/tests/references/wisps-close-gnome-wayland-nested-33.png b/tests/references/wisps-close-gnome-wayland-nested-33.png
new file mode 100644
index 0000000..6ce4190
Binary files /dev/null and b/tests/references/wisps-close-gnome-wayland-nested-33.png differ
diff --git a/tests/references/wisps-close-gnome-wayland-nested-34.png b/tests/references/wisps-close-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..c9b246c
Binary files /dev/null and b/tests/references/wisps-close-gnome-wayland-nested-34.png differ
diff --git a/tests/references/wisps-close-gnome-wayland-nested-35.png b/tests/references/wisps-close-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..c9b246c
Binary files /dev/null and b/tests/references/wisps-close-gnome-wayland-nested-35.png differ
diff --git a/tests/references/wisps-close-gnome-wayland-nested-36.png b/tests/references/wisps-close-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..f58a196
Binary files /dev/null and b/tests/references/wisps-close-gnome-wayland-nested-36.png differ
diff --git a/tests/references/wisps-close-gnome-xsession-32.png b/tests/references/wisps-close-gnome-xsession-32.png
new file mode 100644
index 0000000..5f8f9a3
Binary files /dev/null and b/tests/references/wisps-close-gnome-xsession-32.png differ
diff --git a/tests/references/wisps-close-gnome-xsession-33.png b/tests/references/wisps-close-gnome-xsession-33.png
new file mode 100644
index 0000000..6ce4190
Binary files /dev/null and b/tests/references/wisps-close-gnome-xsession-33.png differ
diff --git a/tests/references/wisps-close-gnome-xsession-34.png b/tests/references/wisps-close-gnome-xsession-34.png
new file mode 100644
index 0000000..a2a5254
Binary files /dev/null and b/tests/references/wisps-close-gnome-xsession-34.png differ
diff --git a/tests/references/wisps-close-gnome-xsession-35.png b/tests/references/wisps-close-gnome-xsession-35.png
new file mode 100644
index 0000000..a2a5254
Binary files /dev/null and b/tests/references/wisps-close-gnome-xsession-35.png differ
diff --git a/tests/references/wisps-close-gnome-xsession-36.png b/tests/references/wisps-close-gnome-xsession-36.png
new file mode 100644
index 0000000..04ca5d4
Binary files /dev/null and b/tests/references/wisps-close-gnome-xsession-36.png differ
diff --git a/tests/references/wisps-open-gnome-wayland-nested-32.png b/tests/references/wisps-open-gnome-wayland-nested-32.png
new file mode 100644
index 0000000..5f8f9a3
Binary files /dev/null and b/tests/references/wisps-open-gnome-wayland-nested-32.png differ
diff --git a/tests/references/wisps-open-gnome-wayland-nested-33.png b/tests/references/wisps-open-gnome-wayland-nested-33.png
new file mode 100644
index 0000000..6ce4190
Binary files /dev/null and b/tests/references/wisps-open-gnome-wayland-nested-33.png differ
diff --git a/tests/references/wisps-open-gnome-wayland-nested-34.png b/tests/references/wisps-open-gnome-wayland-nested-34.png
new file mode 100644
index 0000000..c9b246c
Binary files /dev/null and b/tests/references/wisps-open-gnome-wayland-nested-34.png differ
diff --git a/tests/references/wisps-open-gnome-wayland-nested-35.png b/tests/references/wisps-open-gnome-wayland-nested-35.png
new file mode 100644
index 0000000..c9b246c
Binary files /dev/null and b/tests/references/wisps-open-gnome-wayland-nested-35.png differ
diff --git a/tests/references/wisps-open-gnome-wayland-nested-36.png b/tests/references/wisps-open-gnome-wayland-nested-36.png
new file mode 100644
index 0000000..f58a196
Binary files /dev/null and b/tests/references/wisps-open-gnome-wayland-nested-36.png differ
diff --git a/tests/references/wisps-open-gnome-xsession-32.png b/tests/references/wisps-open-gnome-xsession-32.png
new file mode 100644
index 0000000..5f8f9a3
Binary files /dev/null and b/tests/references/wisps-open-gnome-xsession-32.png differ
diff --git a/tests/references/wisps-open-gnome-xsession-33.png b/tests/references/wisps-open-gnome-xsession-33.png
new file mode 100644
index 0000000..6ce4190
Binary files /dev/null and b/tests/references/wisps-open-gnome-xsession-33.png differ
diff --git a/tests/references/wisps-open-gnome-xsession-34.png b/tests/references/wisps-open-gnome-xsession-34.png
new file mode 100644
index 0000000..a2a5254
Binary files /dev/null and b/tests/references/wisps-open-gnome-xsession-34.png differ
diff --git a/tests/references/wisps-open-gnome-xsession-35.png b/tests/references/wisps-open-gnome-xsession-35.png
new file mode 100644
index 0000000..a2a5254
Binary files /dev/null and b/tests/references/wisps-open-gnome-xsession-35.png differ
diff --git a/tests/references/wisps-open-gnome-xsession-36.png b/tests/references/wisps-open-gnome-xsession-36.png
new file mode 100644
index 0000000..04ca5d4
Binary files /dev/null and b/tests/references/wisps-open-gnome-xsession-36.png differ
diff --git a/tests/run-test.sh b/tests/run-test.sh
index 8d04204..0e9f398 100755
--- a/tests/run-test.sh
+++ b/tests/run-test.sh
@@ -58,11 +58,24 @@ cd "$( cd "$( dirname "$0" )" && pwd )/.." || \
IMAGE="ghcr.io/schneegans/gnome-shell-pod-${FEDORA_VERSION}"
EXTENSION="burn-my-windows@schneegans.github.com"
+# All references images of the effects are captured at & cropped to this region
+# in the center of the screen. This is kind of arbitrary, but has been choosen so that
+# something is visible from each effect.
+CROP="100x100+910+480"
+
# Run the container. For more info, visit https://github.com/Schneegans/gnome-shell-pod.
POD=$(podman run --rm --cap-add=SYS_NICE --cap-add=IPC_LOCK -td "${IMAGE}")
+# Create a temporary directory.
+WORK_DIR=$(mktemp -d)
+if [[ ! "${WORK_DIR}" || ! -d "${WORK_DIR}" ]]; then
+ echo "Failed to create tmp directory!" >&2
+ exit 1
+fi
+
# Properly shutdown podman when this script is exited.
quit() {
+ rm -r "${WORK_DIR}"
podman kill "${POD}"
wait
}
@@ -81,37 +94,27 @@ do_in_pod() {
fail() {
echo "${1}"
podman cp "${POD}:/opt/Xvfb_screen0" - | tar xf - --to-command 'convert xwd:- fail.png'
- LOG=$(do_in_pod sudo journalctl | grep -C 5 "error\|gjs")
+ LOG=$(do_in_pod sudo journalctl)
echo "${LOG}" > fail.log
exit 1
}
-# This searches the virtual screen of the container for a given target image (first
-# parameter). If it is not found, an error message (second paramter) is printed and the
-# script exits via the fail() method above.
-find_target() {
+# This captures the center of the virtual screen in the container and cmopares it to the
+# given target image (first parameter). If it is not found, an error message (second
+# paramter) is printed and the script exits via the fail() method above.
+compare_with_target() {
echo "Looking for ${1} on the screen."
- POS=$(do_in_pod find-target.sh "${1}") || true
- if [[ -z "${POS}" ]]; then
+
+ do_in_pod import -window root -crop $CROP out.png
+ podman cp "${POD}":/home/gnomeshell/out.png "${WORK_DIR}/out.png"
+
+ DIFF=$(compare "${WORK_DIR}/out.png" "${1}" -metric NCC "${WORK_DIR}/diff.png" 2>&1) || true
+
+ if (( $(echo "$DIFF < 0.9" |bc -l) )); then
fail "${2}"
fi
}
-# This searches the virtual screen of the container for a given target image (first
-# parameter) and moves the mouse to the upper left corner of the best match. If the target
-# image is not found, an error message (second paramter) is printed and the script exits
-# via the fail() method above.
-move_mouse_to_target() {
- echo "Trying to move mouse to ${1}."
- POS=$(do_in_pod find-target.sh "${1}") || true
- if [[ -z "${POS}" ]]; then
- fail "${2}"
- fi
-
- # shellcheck disable=SC2086
- do_in_pod xdotool mousemove $POS
-}
-
# This simulates the given keystroke in the container. Simply calling "xdotool key $1"
# sometimes fails to be recognized. Maybe the default 12ms between key-down and key-up
# are too short for xvfb...
@@ -121,15 +124,32 @@ send_keystroke() {
do_in_pod xdotool keyup "${1}"
}
-# This simulates a mouse click in the container. Simply calling "xdotool click $1"
-# sometimes fails to be recognized. Maybe the default 12ms between button-down and
-# button-up are too short for xvfb...
-send_click() {
- do_in_pod xdotool mousedown "${1}"
- sleep 0.5
- do_in_pod xdotool mouseup "${1}"
+# This can be used to set a gsettings key of the extension.
+set_setting() {
+ do_in_pod gsettings --schemadir /home/gnomeshell/.local/share/gnome-shell/extensions/burn-my-windows@schneegans.github.com/schemas \
+ set org.gnome.shell.extensions.burn-my-windows "${1}" "${2}"
}
+# This opens the extensions preferences dialog and captures two images: One during the
+# window-open animation, and one during the window-close animation. For each capture, a
+# reference image is searched. The sleeps are a bit excessive, but it's difficult to get
+# consistent results with shorter sleeps. The animations are shown for five seconds, so
+# we also have to make sure that one animation is finished before starting the next one.
+test_effect() {
+ echo "Testing ${1} effect."
+
+ set_setting "open-preview-effect" "${1}"
+ set_setting "close-preview-effect" "${1}"
+
+ sleep 2
+ do_in_pod gnome-extensions prefs "${EXTENSION}"
+ sleep 2
+ compare_with_target "tests/references/${1}-open-${SESSION}-${FEDORA_VERSION}.png" "Failed to test ${1} window open effect!"
+ send_keystroke "Alt+F4"
+ sleep 2
+ compare_with_target "tests/references/${1}-close-${SESSION}-${FEDORA_VERSION}.png" "Failed to test ${1} window close effect!"
+ sleep 2
+}
# ----------------------------------------------------- wait for the container to start up
@@ -140,10 +160,8 @@ do_in_pod wait-user-bus.sh > /dev/null 2>&1
# ----------------------------------------------------- install the to-be-tested extension
echo "Installing extension."
-podman cp "tests/references" "${POD}:/home/gnomeshell/references"
podman cp "${EXTENSION}.zip" "${POD}:/home/gnomeshell"
do_in_pod gnome-extensions install "${EXTENSION}.zip"
-do_in_pod gnome-extensions enable "${EXTENSION}"
# ---------------------------------------------------------------------- start GNOME Shell
@@ -159,22 +177,36 @@ echo "Starting $(do_in_pod gnome-shell --version)."
do_in_pod systemctl --user start "${SESSION}@:99"
sleep 10
+# Enable the extension.
+do_in_pod gnome-extensions enable "${EXTENSION}"
+
# Starting with GNOME 40, the overview is the default mode. We close this here by hitting
# the super key.
if [[ "${FEDORA_VERSION}" -gt 33 ]]; then
echo "Closing Overview."
send_keystroke "super"
- sleep 3
fi
+# Wait until the extension is enabled and the overview closed.
+sleep 3
# ---------------------------------------------------------------------- perform the tests
-# First we open the preferences and check whether the window is shown on screen by
-# searching for a small snippet of the preferences dialog.
-echo "Opening Preferences."
-do_in_pod gnome-extensions prefs "${EXTENSION}"
-sleep 3
-find_target "references/preferences.png" "Failed to open preferences!"
+# The test mode ensures that the animations are "frozen" and do not change in time.
+echo "Entering test mode."
+set_setting "test-mode" true
+do_in_pod gsettings set org.gnome.mutter center-new-windows true
+
+test_effect "energize-a"
+test_effect "energize-b"
+test_effect "fire"
+test_effect "tv"
+test_effect "wisps"
+
+if [[ "${FEDORA_VERSION}" -gt 33 ]]; then
+ test_effect "trex"
+ test_effect "broken-glass"
+ test_effect "matrix"
+fi
echo "All tests executed successfully."