# Visible UI callbacks (S048, D-045): what a hidden run can't show. Run by hand on the user's screen with the user's
# Wayland display and session bus (portal, notifications) but a throwaway home, e.g.
#   HOME=$t XDG_CONFIG_HOME=$t/.config XDG_DATA_HOME=$t/.local/share XDG_CACHE_HOME=$t/.cache NACRE_SCRIPT=<copy> nacre
# and grab DP-1 with grim meanwhile: the portal's file chooser (cancelled by the user or left to close with Nacre),
# a system notification, the page's own full screen (chrome hidden), Web Inspector attached (F12).
wait 3
open @PAGES@/dialogs.html
waitload
js document.getElementById('f').click()
wait 6
shot file-request
js Notification.requestPermission().then(p => { window.np = p; })
wait 1
prompt allow
wait 1
assert window.np === "granted"
js new Notification("Nacre test", { body: "S048 visible run" }), 1
js window.onbeforeunload = null
wait 4
open @PAGES@/basics.html
waitload
js document.documentElement.requestFullscreen()
wait 2
status fullscreen-page
shot fullscreen-page
js document.exitFullscreen()
wait 2
do devtools
wait 6
shot inspector
status done
quit
