mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 12:20:20 +01:00
Wallpaper test tweaks
This commit is contained in:
parent
6bb612d32d
commit
f8152f4b73
|
|
@ -85,7 +85,7 @@ const useWallpaper = (
|
||||||
);
|
);
|
||||||
const loadWallpaper = useCallback(
|
const loadWallpaper = useCallback(
|
||||||
async (keepCanvas?: boolean) => {
|
async (keepCanvas?: boolean) => {
|
||||||
if (!desktopRef.current) return;
|
if (!desktopRef.current || window.DEBUG_DISABLE_WALLPAPER) return;
|
||||||
|
|
||||||
let config: WallpaperConfig | undefined;
|
let config: WallpaperConfig | undefined;
|
||||||
const { matches: prefersReducedMotion } = window.matchMedia(
|
const { matches: prefersReducedMotion } = window.matchMedia(
|
||||||
|
|
@ -487,7 +487,7 @@ const useWallpaper = (
|
||||||
]);
|
]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (sessionLoaded && !window.DEBUG_DISABLE_WALLPAPER) {
|
if (sessionLoaded) {
|
||||||
if (wallpaperTimerRef.current) {
|
if (wallpaperTimerRef.current) {
|
||||||
window.clearTimeout(wallpaperTimerRef.current);
|
window.clearTimeout(wallpaperTimerRef.current);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import {
|
||||||
contextMenuIsVisible,
|
contextMenuIsVisible,
|
||||||
desktopIsVisible,
|
desktopIsVisible,
|
||||||
didCaptureConsoleLogs,
|
didCaptureConsoleLogs,
|
||||||
|
disableWallpaper,
|
||||||
fileExplorerEntriesAreVisible,
|
fileExplorerEntriesAreVisible,
|
||||||
loadAppWithCanvas,
|
loadAppWithCanvas,
|
||||||
mockPictureSlideshowRequest,
|
mockPictureSlideshowRequest,
|
||||||
|
|
@ -46,6 +47,7 @@ test("can change background", async ({ headless, browserName, page }) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("can set backgound", () => {
|
test.describe("can set backgound", () => {
|
||||||
|
test.beforeEach(disableWallpaper);
|
||||||
test.beforeEach(async ({ page }) => page.goto("/?url=/System/Icons/48x48"));
|
test.beforeEach(async ({ page }) => page.goto("/?url=/System/Icons/48x48"));
|
||||||
test.beforeEach(windowsAreVisible);
|
test.beforeEach(windowsAreVisible);
|
||||||
test.beforeEach(fileExplorerEntriesAreVisible);
|
test.beforeEach(fileExplorerEntriesAreVisible);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user