# Stores pass (S008): settings changed with `set` take effect and reach settings.json (see stores-settings-check.sh).
#   python3 -m http.server 8768 --bind 127.0.0.1 --directory tests/smoke/pages &
#   tools/smoke.sh tests/smoke/stores-settings.txt <outdir>   then   tests/smoke/stores-settings-check.sh <outdir>
wait 3
# Default page zoom applies to a site with no zoom of its own.
set /web/zoom 1.5
open http://127.0.0.1:8768/hello.html
waitload
wait 1
status zoom
expect /active/zoom 1.5
set /web/zoom 1.0
# Password vault off: submitting a login form asks nothing; on again: it asks.
set /vault/enabled false
open http://127.0.0.1:8768/login.html
waitload
waitfor 10 document.getElementById('pass') !== null
locate #user
wait 1
click @
pagetype zoe
locate #pass
wait 1
click @
pagetype pw-for-zoe-1
locate #go
wait 1
click @
wait 2
status vault-off
expect /active/prompts 0
set /vault/enabled true
open http://127.0.0.1:8768/login.html
waitload
waitfor 10 document.getElementById('pass') !== null
locate #user
wait 1
click @
pagetype zoe
locate #pass
wait 1
click @
pagetype pw-for-zoe-1
locate #go
wait 1
click @
wait 2
status vault-on
expect /active/prompts 1
# Theme, search engine, home page: stored and applied.
set /theme/mode "dark"
set /startup/search_engine "bing"
set /startup/home_url "http://127.0.0.1:8768/hello.html"
set /ui/bookmarks_bar "never"
page nacre://settings/appearance
wait 1
shot appearance-dark
set /theme/mode "light"
wait 1
shot appearance-light
status done
quit
